2023-10-21 07:53:24 +00:00
|
|
|
version: '3'
|
|
|
|
services:
|
|
|
|
tianji:
|
2023-10-21 12:19:27 +00:00
|
|
|
image: moonrailgun/tianji
|
2024-09-28 17:41:01 +00:00
|
|
|
build:
|
|
|
|
context: ./
|
|
|
|
dockerfile: ./Dockerfile
|
2023-10-21 07:53:24 +00:00
|
|
|
ports:
|
|
|
|
- "12345:12345"
|
|
|
|
environment:
|
2023-10-22 08:59:04 +00:00
|
|
|
DATABASE_URL: postgresql://tianji:tianji@postgres:5432/tianji
|
2023-10-21 07:53:24 +00:00
|
|
|
JWT_SECRET: replace-me-with-a-random-string
|
2023-10-21 12:19:27 +00:00
|
|
|
ALLOW_REGISTER: "false"
|
2023-10-21 16:26:13 +00:00
|
|
|
ALLOW_OPENAPI: "true"
|
2023-10-21 07:53:24 +00:00
|
|
|
depends_on:
|
2023-10-21 12:19:27 +00:00
|
|
|
- postgres
|
2023-10-21 07:53:24 +00:00
|
|
|
restart: always
|
|
|
|
postgres:
|
|
|
|
image: postgres:15.4-alpine
|
|
|
|
environment:
|
|
|
|
POSTGRES_DB: tianji
|
|
|
|
POSTGRES_USER: tianji
|
|
|
|
POSTGRES_PASSWORD: tianji
|
|
|
|
volumes:
|
|
|
|
- tianji-db-data:/var/lib/postgresql/data
|
|
|
|
restart: always
|
|
|
|
healthcheck:
|
|
|
|
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
|
|
|
|
interval: 5s
|
|
|
|
timeout: 5s
|
|
|
|
retries: 5
|
|
|
|
volumes:
|
|
|
|
tianji-db-data:
|