ci: add ansible and CICD deployment
This commit is contained in:
+29
-14
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user