ci: add ansible and CICD deployment
Push -> develop / Build Docker images (push) Successful in 14s
Push -> develop / Deploy (push) Successful in 19s
Push -> develop / Notify on result (push) Successful in 0s

This commit is contained in:
sangnn
2026-06-23 07:15:42 +00:00
parent a6d74d9316
commit 6a49eb29c8
24 changed files with 1078 additions and 31 deletions
+29 -14
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"
- "0.0.0.0: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:
- "0.0.0.0: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
@@ -66,9 +85,9 @@ services:
- ./docker/nginx.conf:/etc/nginx/nginx.conf:ro
ports:
- "${HTTP_PORT:-80}:80"
- "${HTTPS_PORT:-443}:443"
depends_on:
- api
- api1
- api2
networks:
- authy2-network
restart: unless-stopped
@@ -79,9 +98,7 @@ services:
retries: 3
zerotier-reconciler:
build:
context: .
dockerfile: Dockerfile.job
image: gatehouse-api-job:${IMAGE_TAG:-latest}
env_file:
- .env
environment:
@@ -97,9 +114,7 @@ services:
restart: unless-stopped
mfa-compliance:
build:
context: .
dockerfile: Dockerfile.job
image: gatehouse-api-job:${IMAGE_TAG:-latest}
env_file:
- .env
environment: