Commit f86b9376 authored by Kantz's avatar Kantz
Browse files

nginx vom Frontend abgelöst

parent bca28457
services: services:
nginx:
image: nginx:1.27-alpine
depends_on:
- backend
- frontend
ports:
- "80:80"
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
- frontend-dist:/usr/share/nginx/html:ro
restart: unless-stopped
backend: backend:
build: build:
context: ../backend context: ../backend
...@@ -23,15 +35,15 @@ services: ...@@ -23,15 +35,15 @@ services:
volumes: volumes:
- ./logs:/app/logs - ./logs:/app/logs
frontend: frontend:
build: build:
context: ../frontend context: ../frontend
dockerfile: Dockerfile dockerfile: Dockerfile
depends_on: depends_on:
- backend - backend
ports:
- "80:80"
volumes: volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro - frontend-dist:/dist
restart: unless-stopped restart: unless-stopped
volumes:
frontend-dist:
...@@ -10,10 +10,10 @@ RUN pnpm install --frozen-lockfile ...@@ -10,10 +10,10 @@ RUN pnpm install --frozen-lockfile
COPY . . COPY . .
RUN pnpm run build RUN pnpm run build
FROM nginx:1.27-alpine FROM alpine:3.20
COPY --from=build /app/dist /usr/share/nginx/html WORKDIR /app
EXPOSE 80 COPY --from=build /app/dist ./dist
CMD ["nginx", "-g", "daemon off;"] CMD ["sh", "-c", "mkdir -p /dist && cp -r /app/dist/. /dist/ && tail -f /dev/null"]
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment