summaryrefslogtreecommitdiff
path: root/docker-compose.yml
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--docker-compose.yml47
1 files changed, 47 insertions, 0 deletions
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 0000000..9e74612
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,47 @@
+services:
+ postgres:
+ image: postgres:16-alpine
+ environment:
+ POSTGRES_USER: aigw
+ POSTGRES_PASSWORD: aigw
+ POSTGRES_DB: aigw
+ ports:
+ - "127.0.0.1:5432:5432"
+ volumes:
+ - aigw-postgres:/var/lib/postgresql/data
+ healthcheck:
+ test: ["CMD-SHELL", "pg_isready -U aigw -d aigw"]
+ interval: 5s
+ timeout: 3s
+ retries: 20
+
+ redis:
+ image: redis:7-alpine
+ ports:
+ - "127.0.0.1:6379:6379"
+ volumes:
+ - aigw-redis:/data
+ healthcheck:
+ test: ["CMD", "redis-cli", "ping"]
+ interval: 5s
+ timeout: 3s
+ retries: 20
+
+ aigw:
+ build: .
+ depends_on:
+ postgres:
+ condition: service_healthy
+ ports:
+ - "127.0.0.1:8080:8080"
+ environment:
+ AIGW_DATABASE_URL: postgres://aigw:aigw@postgres:5432/aigw?sslmode=disable
+ AIGW_REDIS_URL: redis://redis:6379/0
+ AIGW_CREDENTIAL_KEY: ${AIGW_CREDENTIAL_KEY:?set AIGW_CREDENTIAL_KEY}
+ AIGW_ADMIN_TOKEN: ${AIGW_ADMIN_TOKEN:?set AIGW_ADMIN_TOKEN}
+ volumes:
+ - ./config.control.example.json:/etc/aigw/config.json:ro
+
+volumes:
+ aigw-postgres:
+ aigw-redis: