my_app_remote_server_ui_app/server/docker-compose.yml
2025-12-31 17:26:53 +01:00

40 lines
727 B
YAML

version: "3.9"
services:
mongo:
image: mongo:7
container_name: mongo
restart: unless-stopped
ports:
- "27017:27017"
volumes:
- mongo_data:/data/db
api:
build: ./server
container_name: api
restart: unless-stopped
environment:
- MONGO_URI=mongodb://mongo:27017/mydb
- JWT_SECRET=supersegreto-cambialo
- PORT=3000
ports:
- "3000:3000"
volumes:
- ./server/uploads:/app/uploads
depends_on:
- mongo
frontend:
image: nginx:alpine
container_name: frontend
restart: unless-stopped
ports:
- "8080:80"
volumes:
- ./frontend:/usr/share/nginx/html:ro
depends_on:
- api
volumes:
mongo_data: