Skip to content

Commit

Permalink
Update docker-compose.dev.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jifollan authored and GitHub Enterprise committed Mar 20, 2025
1 parent 9c895ad commit 64dc5b1
Showing 1 changed file with 19 additions and 33 deletions.
52 changes: 19 additions & 33 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -1,55 +1,41 @@
version: '3'
name: secfit_dev

volumes:
backend_vol:
#driver: local
#driver_opts:
# type: 'none'
# o: 'bind'
# device: '/var/opt/secfit/dev_backend/app'

services:
backend:
container_name: secfit_dev_backend
build:
context: backend/
dockerfile: Dockerfile
network: host #Need to expose it during setup, then it is isolated during running
networks:
backend_bridge:
- backend_bridge
ports:
- ${DEV_PORT_PREFIX}4:8000
- "${DEV_BACKEND_PORT}:8000" # Map host port 20414 to container port 8000 (backend)
volumes:
- backend_vol:/app

frontend:
container_name: secfit_dev_frontend
build:
context: frontend/
dockerfile: Dockerfile
network: host #Need to expose it during setup, then it is isolated during running
#environment:
# PUBLIC_URL: "dev/public"
ports:
- ${DEV_PORT_PREFIX}5:3000
networks:
backend_bridge:
- backend_bridge
ports:
- "${DEV_FRONTEND_PORT}:3000" # Map host port 20415 to container port 3000 (frontend)

gateway:
container_name: secfit_dev_gateway
image: nginx:latest
ports:
- "20416:80" # Map host port 20416 to container port 80
networks:
- backend_bridge
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
depends_on:
- frontend
- backend
gateway:
container_name: secfit_dev_gateway
image: nginx:latest
ports:
- "${DEV_GATEWAY_PORT}:80" # Map host port 20416 to container port 80 (gateway)
networks:
- backend_bridge
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
depends_on:
- frontend
- backend

# The network configuration isolates the modules within a single network and an IP.
networks:
networks:
backend_bridge:
driver: bridge

0 comments on commit 64dc5b1

Please sign in to comment.