Presupuestador_web/docker-compose.yml

102 lines
2.0 KiB
YAML
Raw Normal View History

2024-08-01 14:55:30 +00:00
services:
2024-09-09 07:40:39 +00:00
caddy:
2024-09-16 12:02:13 +00:00
container_name: caddy
2024-09-09 11:24:26 +00:00
env_file: "stack.env"
2024-09-09 08:03:35 +00:00
image: caddy:alpine
2024-09-09 07:40:39 +00:00
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile # Monta el archivo de configuración
- caddy_data:/data # Almacena los certificados en este volumen
- caddy_config:/config # Configuración de Caddy
2024-10-01 16:01:05 +00:00
- shared_frontend:/www
2024-09-09 07:40:39 +00:00
ports:
- 80:80 # Puerto HTTP (Caddy lo redirige automáticamente a HTTPS)
- 443:443 # Puerto HTTPS
2024-09-09 08:38:33 +00:00
- 13001:13001
2024-09-09 07:40:39 +00:00
networks:
2024-09-09 08:03:35 +00:00
- reverse_proxy
2024-09-16 07:58:03 +00:00
restart: on-failure
2024-09-09 07:40:39 +00:00
2024-09-08 19:37:20 +00:00
mariadb:
2024-09-16 12:02:13 +00:00
container_name: mariadb
2024-09-08 19:37:20 +00:00
env_file: "stack.env"
image: mariadb:latest
2024-09-08 20:41:51 +00:00
ports:
- 3306:3306
2024-09-08 19:37:20 +00:00
volumes:
- mariadb_data:/var/lib/mysql
networks:
2024-09-09 08:03:35 +00:00
- private
2024-09-16 07:58:03 +00:00
restart: on-failure
2024-09-08 19:37:20 +00:00
2024-09-09 08:20:53 +00:00
wait-for-mariadb:
2024-09-09 08:19:00 +00:00
image: atkrad/wait4x
depends_on:
- mariadb
2024-09-09 08:20:53 +00:00
command: tcp mariadb:3306 -t 30s -i 250ms
networks:
- private
2024-09-09 08:19:00 +00:00
2024-09-08 19:37:20 +00:00
phpmyadmin:
2024-09-16 12:02:13 +00:00
container_name: phpmyadmin
2024-09-08 19:52:46 +00:00
env_file: "stack.env"
2024-09-08 19:37:20 +00:00
image: phpmyadmin/phpmyadmin
ports:
- 8080:80
networks:
2024-09-09 08:03:35 +00:00
- private
2024-09-08 19:37:20 +00:00
depends_on:
- mariadb
2024-09-06 15:13:19 +00:00
backend:
2024-09-16 12:02:13 +00:00
container_name: "backend"
2024-09-08 17:18:27 +00:00
env_file: "stack.env"
2024-09-06 15:31:37 +00:00
build:
args:
2024-09-06 15:58:52 +00:00
- NODE_ENV=production
2024-09-08 11:02:41 +00:00
context: ./
dockerfile: Dockerfile.server
2024-09-08 19:57:35 +00:00
environment:
- NODE_ENV=production
2024-09-08 20:05:26 +00:00
volumes:
2024-09-08 20:41:51 +00:00
- backend_logs:/var/log
2024-09-23 15:56:15 +00:00
- backend_uploads:/api/uploads
2024-09-06 16:44:08 +00:00
ports:
2024-09-08 17:08:01 +00:00
- 3001:3001
2024-09-06 15:13:19 +00:00
networks:
2024-09-09 08:03:35 +00:00
- private
- reverse_proxy
2024-09-08 19:37:20 +00:00
depends_on:
2024-09-09 08:20:53 +00:00
wait-for-mariadb:
2024-09-09 08:19:00 +00:00
condition: service_completed_successfully
2024-09-09 08:12:23 +00:00
restart: on-failure
2024-09-06 15:13:19 +00:00
2024-09-09 10:36:15 +00:00
frontend:
2024-09-16 12:02:13 +00:00
container_name: "frontend"
2024-09-09 10:36:15 +00:00
env_file: "stack.env"
build:
args:
- NODE_ENV=production
context: ./
dockerfile: Dockerfile.client
environment:
- NODE_ENV=production
volumes:
2024-10-01 16:01:05 +00:00
- shared_frontend:/www
2024-09-09 10:36:15 +00:00
networks:
- reverse_proxy
2024-09-12 19:46:59 +00:00
depends_on:
- caddy
2024-09-12 19:48:24 +00:00
- backend
2024-09-09 09:32:11 +00:00
2024-09-08 19:37:20 +00:00
volumes:
2024-09-09 10:36:15 +00:00
shared_frontend:
2024-09-09 07:40:39 +00:00
caddy_data:
caddy_config:
2024-09-08 19:37:20 +00:00
mariadb_data:
2024-09-08 20:08:19 +00:00
backend_logs:
2024-09-23 17:41:14 +00:00
backend_uploads:
2024-08-01 14:55:30 +00:00
networks:
2024-09-09 08:03:35 +00:00
private:
reverse_proxy: