wslc-wip 0.16.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +11 -0
- data/lib/wip/doctor.rb +6 -0
- data/lib/wip/initializer.rb +7 -1
- data/lib/wip/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0b6d4bd2dc0f6ceb899efeaebe7378c6b043915b2d640bf4efff7501f5ca4852
|
|
4
|
+
data.tar.gz: e5d6c0ed4b89bacaa374482bc7e815a5b04883b4d817809b6dbb0a91c9801ae3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: aed82d2db66e8036c55986181ce73fc032a1785c3ac3a314aadcc2ef7a8b91f6280dc31cbc209aa97dd25ad5eed536013954ca593b61ed966792004209ebcb2f
|
|
7
|
+
data.tar.gz: 94ee0961eddd267ca8fc8e8f1e198dbd4793801b15c2512539ff55c6cb5223c5ae7e331807030f7eca8d5264b38527db6f4e993ae61fb14d4ef6bdbf26eaf1ad
|
data/README.md
CHANGED
|
@@ -153,6 +153,17 @@ bind-mounted](#slow-boot-when-the-app-directory-is-bind-mounted) for why. A `syn
|
|
|
153
153
|
that problem to `wip`: the source is mounted read-only, the app runs off a named volume, and wip
|
|
154
154
|
mirrors one into the other with `rsync`.
|
|
155
155
|
|
|
156
|
+
`wip up`'s pre-boot mirror always uses a throwaway container (the primary one isn't running yet),
|
|
157
|
+
so `sync.image`/`sync.build` apply there regardless of `sync.mode` — falling back to the primary
|
|
158
|
+
container's own image if neither is set under `mode: container`/`compose-native` (both have a
|
|
159
|
+
`dependencies:` entry to borrow it from); `mode: compose` has no such entry, so one of
|
|
160
|
+
`sync.image`/`sync.build` is required there. Where `sync.mode` actually matters is every mirror
|
|
161
|
+
*after* that: under `sync.mode: exec` (the default for `mode: container`/`compose-native`), `wip
|
|
162
|
+
sync`/`wip sync --watch` run `rsync` inside the already-running primary container instead, so
|
|
163
|
+
*that* image needs `rsync` installed — `sync.image`/`sync.build` are ignored for these. Under
|
|
164
|
+
`sync.mode: run`, every mirror (pre-boot included) uses a throwaway container, so `sync.image`/
|
|
165
|
+
`sync.build` (or the primary image fallback, where available) need `rsync` throughout.
|
|
166
|
+
|
|
156
167
|
```yaml
|
|
157
168
|
sync:
|
|
158
169
|
source: . # host path, relative to wip.yml (default: the wip.yml directory)
|
data/lib/wip/doctor.rb
CHANGED
|
@@ -138,6 +138,12 @@ module Wip
|
|
|
138
138
|
results << result(File.directory?(sync.source) ? :ok : :fail,
|
|
139
139
|
"Sync source #{sync.source} mirrors into volume #{sync.volume} at #{sync.target}",
|
|
140
140
|
"Sync source not found: #{sync.source}")
|
|
141
|
+
return unless sync.exec? && (sync.image || sync.build)
|
|
142
|
+
|
|
143
|
+
results << Result.new(:warn, 'sync.image/sync.build only cover `wip up`’s one-time pre-boot mirror ' \
|
|
144
|
+
'(the primary container isn’t running yet, so that step always uses a ' \
|
|
145
|
+
'throwaway container) — sync.mode: exec’s `wip sync`/`wip sync --watch` run ' \
|
|
146
|
+
'rsync inside the primary container instead, so its image needs rsync too')
|
|
141
147
|
end
|
|
142
148
|
|
|
143
149
|
def result(condition, ok_message, fail_message)
|
data/lib/wip/initializer.rb
CHANGED
|
@@ -122,7 +122,13 @@ module Wip
|
|
|
122
122
|
# optional; exec (default, mirrors into the running container) | run (always a fresh container)
|
|
123
123
|
mode: exec
|
|
124
124
|
|
|
125
|
-
#
|
|
125
|
+
# image/build below always cover `wip up`'s pre-boot mirror (a throwaway container, since
|
|
126
|
+
# the primary one isn't running yet — falls back to the primary image if neither is set).
|
|
127
|
+
# With mode: exec above (the default here), `wip sync`/`wip sync --watch` afterward run
|
|
128
|
+
# rsync inside the already-running primary container instead, so its own image needs
|
|
129
|
+
# rsync installed too — image/build below aren't read for those.
|
|
130
|
+
|
|
131
|
+
# image the pre-boot (and, under sync.mode: run, every) mirror container runs
|
|
126
132
|
# image: your/image:tag
|
|
127
133
|
|
|
128
134
|
# alternative to image — let wip build a small dedicated mirror image itself
|
data/lib/wip/version.rb
CHANGED