Ship install/update scripts in the migrate image; no repo clone on hosts
This commit is contained in:
+9
-1
@@ -3,13 +3,21 @@
|
||||
# the source tree. Entrypoint: bootstrap.sh (empty database => schema.sql as
|
||||
# DB_USER, then always the checksummed migration ledger).
|
||||
#
|
||||
# Also ships deploy/federated/ at /deploy (install.sh, update.sh and the
|
||||
# suite integration files), so a core host needs nothing but this image:
|
||||
# docker run --rm federatedcomputer/superbrain-migrate cat /deploy/install.sh
|
||||
# The files arrive via a named build context (BuildKit/buildx only; the dev
|
||||
# compose never builds this image):
|
||||
# docker buildx build --build-context deploy=deploy/federated db/
|
||||
#
|
||||
# Base image = the same postgres alpine the dev stack's migrate service uses;
|
||||
# only the psql client is exercised. Client 16 against a newer server (the
|
||||
# federated suite runs 17.x) is the supported direction.
|
||||
FROM postgres:16.15-alpine
|
||||
|
||||
COPY . /db
|
||||
RUN chmod +x /db/bootstrap.sh /db/migrate.sh
|
||||
COPY --from=deploy . /deploy
|
||||
RUN chmod +x /db/bootstrap.sh /db/migrate.sh /deploy/install.sh /deploy/update.sh
|
||||
|
||||
WORKDIR /db
|
||||
CMD ["sh", "/db/bootstrap.sh"]
|
||||
|
||||
Reference in New Issue
Block a user