diff --git a/.github/workflows/build-push-docker.yml b/.github/workflows/build-push-docker.yml index 0760b07..77a86d3 100644 --- a/.github/workflows/build-push-docker.yml +++ b/.github/workflows/build-push-docker.yml @@ -72,6 +72,8 @@ jobs: run: | touch .env echo "# .env created" >> .env + echo "# .env created" >> ./apps/fe/.env + echo "# .env created" >> ./apps/be/.env cat .env - name: Set COMPOSE_TAG as short commit SHA diff --git a/apps/be/Dockerfile b/apps/be/Dockerfile index 5076db6..12649ea 100644 --- a/apps/be/Dockerfile +++ b/apps/be/Dockerfile @@ -30,12 +30,6 @@ RUN yarn workspaces focus --production && yarn cache clean --all COPY --from=build-stage --chown=node /usr/src/app/dist ./dist -# Just make sure the .env file is existed -RUN mkdir -p /usr/src/app/apps/be && \ - # Add new line to the end of the file - echo "" >> /usr/src/app/apps/be/.env && \ - echo "# .env created" >> /usr/src/app/apps/be/.env - ENV NODE_ENV production CMD ["node", "dist/apps/be/main"] diff --git a/apps/fe/Dockerfile b/apps/fe/Dockerfile index b01baf1..8ba07f7 100644 --- a/apps/fe/Dockerfile +++ b/apps/fe/Dockerfile @@ -25,12 +25,6 @@ WORKDIR /usr/src/app COPY --from=build-stage --chown=node /usr/src/app/dist/apps/fe/.next/standalone ./dist/apps/fe/.next/standalone -# Just make sure the .env file is existed -RUN mkdir -p /usr/src/app/apps/fe && \ - # Add new line to the end of the file - echo "" >> /usr/src/app/apps/fe/.env && \ - echo "# .env created" >> /usr/src/app/apps/fe/.env - ENV PORT 3000 ENV HOST 0.0.0.0 ENV NEXT_TELEMETRY_DISABLED 1