46 lines
1.1 KiB
YAML
46 lines
1.1 KiB
YAML
services:
|
|
# Servicio del Backend
|
|
inventario-api:
|
|
build:
|
|
context: . # El contexto es la raíz del proyecto
|
|
dockerfile: backend/Dockerfile # Docker encontrará este archivo dentro del contexto
|
|
container_name: inventario-api
|
|
restart: unless-stopped
|
|
expose:
|
|
- "8080"
|
|
networks:
|
|
- inventario-net
|
|
- shared-net
|
|
|
|
# Servicio del Frontend
|
|
inventario-frontend:
|
|
build:
|
|
context: ./frontend # El contexto es la carpeta 'frontend'
|
|
dockerfile: Dockerfile # Docker buscará 'Dockerfile' dentro de la carpeta 'frontend'
|
|
container_name: inventario-frontend
|
|
restart: unless-stopped
|
|
expose:
|
|
- "80"
|
|
networks:
|
|
- inventario-net
|
|
|
|
# Proxy Inverso
|
|
inventario-proxy:
|
|
image: nginx:1.25-alpine
|
|
container_name: inventario-proxy
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./frontend/proxy/nginx.conf:/etc/nginx/conf.d/default.conf
|
|
ports:
|
|
- "8900:80"
|
|
networks:
|
|
- inventario-net
|
|
depends_on:
|
|
- inventario-api
|
|
- inventario-frontend
|
|
|
|
networks:
|
|
inventario-net:
|
|
driver: bridge
|
|
shared-net:
|
|
external: true |