diff --git a/.changeset/metal-spoons-change.md b/.changeset/metal-spoons-change.md index 63a3b62320..41828d08ae 100644 --- a/.changeset/metal-spoons-change.md +++ b/.changeset/metal-spoons-change.md @@ -26,6 +26,8 @@ In order to work with the new build method, the `Dockerfile` at `packages/backen # yarn install # yarn tsc # yarn build +# +# Once the commands have been run, you can build the image using `yarn build-image` FROM node:14-buster-slim diff --git a/docs/getting-started/deployment-docker.md b/docs/getting-started/deployment-docker.md index 7e312c13dc..9486e0aeb0 100644 --- a/docs/getting-started/deployment-docker.md +++ b/docs/getting-started/deployment-docker.md @@ -56,6 +56,8 @@ following `Dockerfile`, which is also included when creating a new app with # yarn install # yarn tsc # yarn build +# +# Once the commands have been run, you can build the image using `yarn build-image` FROM node:14-buster-slim diff --git a/packages/backend/Dockerfile b/packages/backend/Dockerfile index 51ebf2980d..acef405c8a 100644 --- a/packages/backend/Dockerfile +++ b/packages/backend/Dockerfile @@ -6,6 +6,8 @@ # yarn install # yarn tsc # yarn build +# +# Once the commands have been run, you can build the image using `yarn build-image` FROM node:14-buster-slim @@ -18,8 +20,7 @@ ADD yarn.lock package.json packages/backend/dist/skeleton.tar.gz ./ RUN yarn install --frozen-lockfile --production --network-timeout 300000 && rm -rf "$(yarn cache dir)" -# This will copy the contents of the dist-workspace when running the build-image command. -# Do not use this Dockerfile outside of that command, as it will copy in the source code instead. +# Then copy the rest of the backend bundle, along with any other files we might want. ADD packages/backend/dist/bundle.tar.gz app-config.yaml ./ -CMD ["node", "packages/backend"] +CMD ["node", "packages/backend", "--config", "app-config.yaml"] diff --git a/packages/create-app/templates/default-app/packages/backend/Dockerfile b/packages/create-app/templates/default-app/packages/backend/Dockerfile index aba69ff97d..acef405c8a 100644 --- a/packages/create-app/templates/default-app/packages/backend/Dockerfile +++ b/packages/create-app/templates/default-app/packages/backend/Dockerfile @@ -6,6 +6,8 @@ # yarn install # yarn tsc # yarn build +# +# Once the commands have been run, you can build the image using `yarn build-image` FROM node:14-buster-slim