Browse Source

Correctly configure environment variables for build

master
buttercat1791 1 year ago
parent
commit
cd65e952f8
  1. 12
      Dockerfile.dev

12
Dockerfile.dev

@ -18,19 +18,23 @@ RUN cd /temp/dev && bun install
# Copy node_modules from temp directory. # Copy node_modules from temp directory.
# Then copy all (non-ignored) project files into the image. # Then copy all (non-ignored) project files into the image.
FROM base AS prerelease FROM base AS prerelease
ENV NODE_ENV=development
ENV ALEX_HOST=0.0.0.0
ENV ALEX_PORT=3040
ENV ALEX_ORIGIN=https://next-alexandria.gitcitadel.eu
COPY --from=install /temp/dev/node_modules node_modules COPY --from=install /temp/dev/node_modules node_modules
COPY . . COPY . .
# Run tests and build. # Run tests and build.
ENV NODE_ENV=development
ENV ALEX_HOST=127.0.0.1
ENV ALEX_PORT=3040
ENV ALEX_ORIGIN=https://next-alexandria.gitcitadel.eu
# RUN bun test # Uncomment when tests are ready. # RUN bun test # Uncomment when tests are ready.
RUN bun run build RUN bun run build
# Copy production dependencies and source code into final image. # Copy production dependencies and source code into final image.
FROM base AS release FROM base AS release
ENV NODE_ENV=development
ENV ALEX_HOST=0.0.0.0
ENV ALEX_PORT=3040
ENV ALEX_ORIGIN=https://next-alexandria.gitcitadel.eu
COPY --from=prerelease /usr/src/app/build . COPY --from=prerelease /usr/src/app/build .
# Run the app. # Run the app.

Loading…
Cancel
Save