ci + ansible

This commit is contained in:
sangnn
2026-06-20 11:06:27 +07:00
parent a6d74d9316
commit 966578ed58
15 changed files with 637 additions and 30 deletions
+27 -30
View File
@@ -1,14 +1,12 @@
version: '3.8'
services:
api:
build:
context: .
dockerfile: Dockerfile
api1:
image: gatehouse-api:${IMAGE_TAG:-latest}
env_file:
- .env
ports:
- "${API_PORT:-5000}:5000"
- "127.0.0.1:5000:5000"
depends_on:
db:
condition: service_healthy
@@ -18,7 +16,28 @@ services:
- authy2-network
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5000/api/health"]
test: ["CMD", "curl", "-f", "http://127.0.0.1:5000/api/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
api2:
image: gatehouse-api:${IMAGE_TAG:-latest}
env_file:
- .env
ports:
- "127.0.0.1:5001:5000"
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
networks:
- authy2-network
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://127.0.0.1:5000/api/health"]
interval: 30s
timeout: 10s
retries: 3
@@ -60,28 +79,8 @@ services:
ports:
- "6379:6379"
nginx:
image: nginx:1.27-alpine
volumes:
- ./docker/nginx.conf:/etc/nginx/nginx.conf:ro
ports:
- "${HTTP_PORT:-80}:80"
- "${HTTPS_PORT:-443}:443"
depends_on:
- api
networks:
- authy2-network
restart: unless-stopped
healthcheck:
test: ["CMD", "nginx", "-t"]
interval: 30s
timeout: 10s
retries: 3
zerotier-reconciler:
build:
context: .
dockerfile: Dockerfile.job
image: gatehouse-api-job:${IMAGE_TAG:-latest}
env_file:
- .env
environment:
@@ -97,9 +96,7 @@ services:
restart: unless-stopped
mfa-compliance:
build:
context: .
dockerfile: Dockerfile.job
image: gatehouse-api-job:${IMAGE_TAG:-latest}
env_file:
- .env
environment: