add
This commit is contained in:
@@ -1,44 +0,0 @@
|
||||
version: "3.9"
|
||||
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:18.1-alpine
|
||||
container_name: user_postgres
|
||||
environment:
|
||||
POSTGRES_USER: app
|
||||
POSTGRES_PASSWORD: app123
|
||||
POSTGRES_DB: appdb
|
||||
ports:
|
||||
- "5432:5432"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U app -d appdb"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 20
|
||||
volumes:
|
||||
- pgdata:/var/lib/postgresql/data
|
||||
- ./services/user/db/schema.sql:/docker-entrypoint-initdb.d/10_user_schema.sql:ro
|
||||
|
||||
user:
|
||||
image: user-service:latest
|
||||
container_name: user_service
|
||||
environment:
|
||||
PG_HOST: postgres
|
||||
PG_PORT: "5432"
|
||||
PG_USER: app
|
||||
PG_PASSWORD: app123
|
||||
PG_DBNAME: appdb
|
||||
PG_SSLMODE: disable
|
||||
MIGRATE_ON_START: "0"
|
||||
PORT: "8080"
|
||||
JWT_SECRET: "change_me_dev_secret"
|
||||
JWT_TTL: "24h"
|
||||
ports:
|
||||
- "8080:8080"
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
pgdata:
|
||||
@@ -3,7 +3,7 @@ version: "3.9"
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:18.1-alpine
|
||||
container_name: user_postgres
|
||||
container_name: api_postgres
|
||||
environment:
|
||||
POSTGRES_USER: app
|
||||
POSTGRES_PASSWORD: app123
|
||||
|
||||
Reference in New Issue
Block a user