-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
47 lines (42 loc) · 1.25 KB
/
docker-compose.yml
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
version: "3.9"
services:
shaman-king-bot:
container_name: shaman-king-bot
build:
context: . # Dockerfile folder
dockerfile: Dockerfile
image: "shaman-king-bot:node"
env_file: .env
# if running locally pointing to the database from docker-compose, use localhost as Host; if running all services, override the host with "postgres" as it's the service name
environment:
- POSTGRES_HOST=postgres
depends_on:
postgres:
condition: service_healthy
postgres:
container_name: postgres-db
image: postgres:14-alpine
ports:
- "5432:5432"
volumes:
- ./data:/var/lib/postgresql/data
#- ./db/schema.sql:/docker-entrypoint-initdb.d/schema.sql # when the db is created, the file inside "docker-entrypoint-initdb.d" is executed
env_file: .env
healthcheck:
test: [ "CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}" ]
interval: 10s
timeout: 5s
retries: 5
# pgadmin:
# image: dpage/pgadmin4
# environment:
# - PGADMIN_DEFAULT_EMAIL=admin@admin.com
# - PGADMIN_DEFAULT_PASSWORD=adminadmin
# ports:
# - "5050:80"
# restart: always
# depends_on:
# postgres:
# condition: service_healthy
volumes:
data: