-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
50 lines (47 loc) · 1.21 KB
/
docker-compose.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
services:
backend:
build:
dockerfile: Dockerfile.backend
context: .
target: dev
env_file:
- .env
depends_on:
database:
condition: service_healthy
volumes:
- ./backend:/var/www
environment: &overflows-environment
CONTAINER_ROLE: backend
DB_HOST: ${DB_HOST:-database}
DB_PORT: ${DB_PORT:-5432}
DB_DATABASE: ${DB_DATABASE:-overflows}
DB_USERNAME: ${DB_USERNAME:-overflower}
DB_PASSWORD: ${DB_PASSWORD:-Passw0rd}
ports:
- "${API_EXPOSE_PORT}:8000"
database:
image: postgres:16
env_file:
- .env
environment:
POSTGRES_DB: ${DB_DATABASE:-overflows}
POSTGRES_USER: ${DB_USERNAME:-overflower}
POSTGRES_PASSWORD: ${DB_PASSWORD:-Passw0rd}
TZ: ${DB_TIMEZONE:-Asia/Shanghai}
healthcheck:
test: ["CMD", "pg_isready", "-d", "${DB_DATABASE:-overflows}", "-U", "${DB_USERNAME:-overflower}"]
start_period: 3s
timeout: 3s
retries: 5
volumes:
- ./backend/manifest/database/Pgsql/:/var/database
- database:/var/lib/postgresql/data
ports:
- "${DB_EXPOSE_PORT}:5432"
pgadminer:
image: adminer
ports:
- 8080:8080
volumes:
database: