diff --git a/app/docker-compose.yml b/app/docker-compose.yml index 0b2b98a6..54ca2960 100644 --- a/app/docker-compose.yml +++ b/app/docker-compose.yml @@ -16,15 +16,15 @@ services: depends_on: - api - # frontend: - # image: frontend - # build: - # dockerfile: ./docker/frontend/Dockerfile - # ports: - # - 8080:5003 - # restart: unless-stopped - # depends_on: - # - api + frontend: + image: frontend + build: + dockerfile: ./frontend/Dockerfile + ports: + - 8080:5003 + restart: unless-stopped + depends_on: + - api api: image: api diff --git a/app/docker/frontend/Dockerfile b/app/frontend/Dockerfile similarity index 81% rename from app/docker/frontend/Dockerfile rename to app/frontend/Dockerfile index c560fee6..cbb972db 100644 --- a/app/docker/frontend/Dockerfile +++ b/app/frontend/Dockerfile @@ -1,6 +1,6 @@ FROM node:20.9.0 as build-stage WORKDIR /app -COPY package*.json ./ +COPY env.template ../.env COPY ./frontend . RUN npm update RUN npm run build @@ -8,5 +8,6 @@ RUN npm run build FROM nginx:1.24.0 as production-stage RUN mkdir /app COPY --from=build-stage /app/dist /app +COPY --from=build-stage /.env .env COPY --from=build-stage /app/nginx.conf /etc/nginx/nginx.conf EXPOSE 5003 \ No newline at end of file