-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml.example
More file actions
61 lines (57 loc) · 1.33 KB
/
docker-compose.yml.example
File metadata and controls
61 lines (57 loc) · 1.33 KB
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
51
52
53
54
55
56
57
58
59
60
61
services:
api:
build: .
ports:
- "${PORT:-3000}:${PORT:-3000}"
environment:
- PORT=${PORT:-3000}
- API_TOKEN=${API_TOKEN}
- DB_HOST=db
- DB_PORT=${DB_PORT:-5432}
- DB_USER=${DB_USER:-postgres}
- DB_PASS=${DB_PASS:-postgres}
- DB_NAME=${DB_NAME:-minecraft_db}
depends_on:
db:
condition: service_healthy
db:
image: postgres:15-alpine
restart: always
environment:
POSTGRES_USER: ${DB_USER:-postgres}
POSTGRES_PASSWORD: ${DB_PASS:-postgres}
POSTGRES_DB: ${DB_NAME:-minecraft_db}
ports:
- "${DB_PORT:-5432}:5432"
volumes:
- db_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-postgres} -d ${DB_NAME:-minecraft_db}"]
interval: 10s
timeout: 5s
retries: 5
pgadmin:
image: dpage/pgadmin4:latest
restart: always
ports:
- "8080:80"
environment:
- PGADMIN_DEFAULT_EMAIL=admin@admin.com
- PGADMIN_DEFAULT_PASSWORD=admin
depends_on:
db:
condition: service_healthy
ngrok:
image: ngrok/ngrok:latest
restart: always
ports:
- "4040:4040"
environment:
- NGROK_AUTHTOKEN=${NGROK_AUTHTOKEN}
command:
- http
- api:${PORT:-3000}
depends_on:
- api
volumes:
db_data: