Se mejoro el disenio de agentes y clientes-proveedores
This commit is contained in:
@@ -17,7 +17,7 @@ services:
|
||||
- backend-net
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U postgres -d anexo76_core || exit 1"]
|
||||
test: [ "CMD-SHELL", "pg_isready -U postgres -d anexo76_core || exit 1" ]
|
||||
interval: 5s
|
||||
timeout: 3s
|
||||
retries: 10
|
||||
@@ -54,7 +54,7 @@ services:
|
||||
- backend-net
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U postgres -d keycloak || exit 1"]
|
||||
test: [ "CMD-SHELL", "pg_isready -U postgres -d keycloak || exit 1" ]
|
||||
interval: 5s
|
||||
timeout: 3s
|
||||
retries: 10
|
||||
@@ -97,7 +97,7 @@ services:
|
||||
KC_HOSTNAME_PATH: /kcauth
|
||||
KC_LOG_LEVEL: INFO
|
||||
JAVA_OPTS_APPEND: "-Xms256m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true"
|
||||
command:
|
||||
command:
|
||||
- start-dev
|
||||
- --http-relative-path=/kcauth
|
||||
- --db=postgres
|
||||
@@ -122,7 +122,19 @@ services:
|
||||
- backend-net
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "exec 3<>/dev/tcp/127.0.0.1/9000; echo -e 'GET /kcauth/health/ready HTTP/1.1\r\nhost: 127.0.0.1\r\nConnection: close\r\n\r\n' >&3; grep -q 'HTTP/1.1 200' <&3 || exit 1"]
|
||||
test:
|
||||
[
|
||||
"CMD-SHELL",
|
||||
"exec 3<>/dev/tcp/127.0.0.1/9000; echo -e 'GET /kcauth/health/ready HTTP/1.1\r
|
||||
|
||||
host: 127.0.0.1\r
|
||||
|
||||
Connection: close\r
|
||||
|
||||
\r
|
||||
|
||||
' >&3; grep -q 'HTTP/1.1 200' <&3 || exit 1"
|
||||
]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 30
|
||||
@@ -178,10 +190,10 @@ services:
|
||||
- backend-net
|
||||
- frontend-net
|
||||
restart: unless-stopped
|
||||
entrypoint: ["/entrypoint.sh"]
|
||||
command: ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000", "--reload", "--log-level", "info"]
|
||||
entrypoint: [ "/entrypoint.sh" ]
|
||||
command: [ "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000", "--reload", "--log-level", "info" ]
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl -f http://localhost:8000/api/health || exit 1"]
|
||||
test: [ "CMD-SHELL", "curl -f http://localhost:8000/api/health || exit 1" ]
|
||||
interval: 15s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -223,7 +235,7 @@ services:
|
||||
depends_on:
|
||||
backend:
|
||||
condition: service_healthy
|
||||
entrypoint: ["/frontend-entrypoint.sh"]
|
||||
entrypoint: [ "/frontend-entrypoint.sh" ]
|
||||
volumes:
|
||||
- ./frontend:/app
|
||||
- frontend_node_modules:/app/node_modules
|
||||
@@ -232,9 +244,9 @@ services:
|
||||
- frontend-net
|
||||
- auth-net
|
||||
restart: unless-stopped
|
||||
command: ["pnpm", "run", "dev", "--", "--host", "0.0.0.0"]
|
||||
command: [ "pnpm", "run", "dev", "--", "--host", "0.0.0.0" ]
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:5173/ || exit 1"]
|
||||
test: [ "CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:5173/ || exit 1" ]
|
||||
interval: 15s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -250,40 +262,27 @@ services:
|
||||
memory: 1G
|
||||
reservations:
|
||||
memory: 512M
|
||||
# celery
|
||||
# celery
|
||||
celery_worker:
|
||||
build: ./backend
|
||||
container_name: a76_worker
|
||||
command: celery -A core.celery_app worker --loglevel=info
|
||||
environment:
|
||||
- VALKEY_URL=redis://valkey:6379/0
|
||||
depends_on:
|
||||
- backend
|
||||
- valkey
|
||||
networks:
|
||||
- backend-net
|
||||
|
||||
valkey:
|
||||
image: valkey/valkey:7.2
|
||||
container_name: a76_valkey
|
||||
restart: always
|
||||
ports:
|
||||
- "6379:6379"
|
||||
networks:
|
||||
- backend-net
|
||||
build: ./backend
|
||||
container_name: a76_worker
|
||||
command: celery -A core.celery_app worker --loglevel=info
|
||||
environment:
|
||||
- VALKEY_URL=redis://valkey:6379/0
|
||||
depends_on:
|
||||
- backend
|
||||
- valkey
|
||||
networks:
|
||||
- backend-net
|
||||
|
||||
flower:
|
||||
image: mher/flower
|
||||
container_name: a76_flower
|
||||
command: celery -A core.celery_app flower
|
||||
ports:
|
||||
- "5555:5555"
|
||||
environment:
|
||||
- CELERY_BROKER_URL=redis://valkey:6379/0
|
||||
depends_on:
|
||||
- valkey
|
||||
networks:
|
||||
- backend-net
|
||||
valkey:
|
||||
image: valkey/valkey:7.2
|
||||
container_name: a76_valkey
|
||||
restart: always
|
||||
ports:
|
||||
- "6379:6379"
|
||||
networks:
|
||||
- backend-net
|
||||
|
||||
volumes:
|
||||
postgres_app_data:
|
||||
@@ -312,4 +311,4 @@ networks:
|
||||
driver: bridge
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 172.22.0.0/16
|
||||
- subnet: 172.22.0.0/16
|
||||
|
||||
Reference in New Issue
Block a user