This commit is contained in:
+11
-11
@@ -1,17 +1,17 @@
|
||||
name: computer
|
||||
name: superbrain
|
||||
services:
|
||||
db:
|
||||
image: postgres:16.15-alpine
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_DB: computer
|
||||
POSTGRES_USER: computer
|
||||
POSTGRES_DB: superbrain
|
||||
POSTGRES_USER: superbrain
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD in .env}
|
||||
volumes:
|
||||
- pgdata:/var/lib/postgresql/data
|
||||
- ./db/schema.sql:/docker-entrypoint-initdb.d/01-schema.sql:ro
|
||||
healthcheck:
|
||||
test: [CMD-SHELL, pg_isready -h 127.0.0.1 -U computer -d computer]
|
||||
test: [CMD-SHELL, pg_isready -h 127.0.0.1 -U superbrain -d superbrain]
|
||||
interval: 3s
|
||||
timeout: 3s
|
||||
retries: 20
|
||||
@@ -25,8 +25,8 @@ services:
|
||||
environment:
|
||||
PGPASSWORD: ${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD in .env}
|
||||
DB_HOST: db
|
||||
DB_USER: computer
|
||||
DB_NAME: computer
|
||||
DB_USER: superbrain
|
||||
DB_NAME: superbrain
|
||||
volumes:
|
||||
- ./db:/db:ro
|
||||
command: [sh, /db/migrate.sh]
|
||||
@@ -38,7 +38,7 @@ services:
|
||||
depends_on:
|
||||
migrate: {condition: service_completed_successfully}
|
||||
environment:
|
||||
DATABASE_URL: postgres://computer:${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD in .env}@db:5432/computer?sslmode=disable
|
||||
DATABASE_URL: postgres://superbrain:${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD in .env}@db:5432/superbrain?sslmode=disable
|
||||
AUTH_SECRET: ${AUTH_SECRET:?Set AUTH_SECRET in .env}
|
||||
NEXTAUTH_SECRET: ${AUTH_SECRET}
|
||||
# Optional dedicated key for stored integration credentials (review
|
||||
@@ -57,7 +57,7 @@ services:
|
||||
OIDC_CLIENT_SECRET: ${OIDC_CLIENT_SECRET:-}
|
||||
ports: ["127.0.0.1:${APP_HOST_PORT:-8080}:8080"]
|
||||
healthcheck:
|
||||
test: [CMD, /computer, --healthcheck]
|
||||
test: [CMD, /superbrain, --healthcheck]
|
||||
interval: 3s
|
||||
timeout: 4s
|
||||
retries: 20
|
||||
@@ -117,7 +117,7 @@ services:
|
||||
- ./db:/src/db:ro
|
||||
tmpfs: ["/tmp:exec"]
|
||||
environment:
|
||||
TEST_DATABASE_URL: postgres://computer:${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD in .env}@db:5432/computer?sslmode=disable
|
||||
TEST_DATABASE_URL: postgres://superbrain:${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD in .env}@db:5432/superbrain?sslmode=disable
|
||||
GOCACHE: /tmp/go-cache
|
||||
GOMODCACHE: /tmp/go-mod
|
||||
command: [go, test, -race, -count=1, -v, ./internal/...]
|
||||
@@ -133,7 +133,7 @@ services:
|
||||
environment:
|
||||
PGPASSWORD: ${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD in .env}
|
||||
DB_HOST: db
|
||||
DB_USER: computer
|
||||
DB_USER: superbrain
|
||||
volumes:
|
||||
- ./db:/db:ro
|
||||
command: [sh, /db/check-convergence.sh]
|
||||
@@ -141,7 +141,7 @@ services:
|
||||
|
||||
volumes:
|
||||
pgdata:
|
||||
name: ${POSTGRES_VOLUME:-computer_pgdata}
|
||||
name: ${POSTGRES_VOLUME:-superbrain_pgdata}
|
||||
external: ${POSTGRES_VOLUME_EXTERNAL:-false}
|
||||
networks:
|
||||
backend:
|
||||
|
||||
Reference in New Issue
Block a user