forked from rl-os/api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
41 lines (38 loc) · 1.09 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
version: '3.5'
services:
db:
image: postgres:11
restart: unless-stopped
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD:-postgres}
POSTGRES_USER: ${DB_USER:-postgres}
POSTGRES_DB: ${DB_NAME:-osu-server}
volumes:
- /var/lib/postgresql/osu-api-server:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
redis:
image: redis:5-alpine
restart: unless-stopped
volumes:
- /var/lib/redis/osu-api-server:/var/lib/redis/data
healthcheck:
test: ["CMD", "redis-cli", "-h", "localhost", "ping"]
backend:
image: deissh/osu-api-server:${BACKEND_TAG:-latest}
restart: unless-stopped
build:
context: .
depends_on:
- db
- redis
environment:
DEBUG: false
SERVER__DATABASE__DRIVER: postgres
SERVER__DATABASE__DSN: postgres://${DB_USER:-postgres}:${DB_PASSWORD:-postgres}@db/${DB_NAME:-osu-server}
SERVER__REDIS__HOST: redis:6379
SERVER__HOST: 0.0.0.0
SERVER__PORT: 2100
SERVER__JWT_SECRET: ${DB_USER:-notset}
ports:
- 2100:2100