-
Notifications
You must be signed in to change notification settings - Fork 49
/
docker-compose.yml
57 lines (54 loc) · 1.4 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
48
49
50
51
52
53
54
55
56
57
# Compose version
version: "3"
services:
# Moonstream API application
moonstreamapi:
build:
context: ./backend/
dockerfile: ./Dockerfile
image: moonstreamapi:latest
ports:
- "127.0.0.1:7481:7481"
# Specify environment file for compose setup
env_file: ./backend/configs/docker.moonstreamapi.env
environment:
MOONSTREAMAPI_HOST: 0.0.0.0
MOONSTREAMAPI_PORT: 7481
MOONSTREAMAPI_UVICORN_WORKERS: 1
healthcheck:
test: ["CMD", "curl", "-f", "http://moonstreamapi:7481/ping"]
interval: 5s
timeout: 1s
retries: 2
start_period: 2s
depends_on:
db:
condition: service_healthy
# Moonstream DB application
moonstreamdb:
build:
context: ./db/
dockerfile: ./Dockerfile
image: moonstreamdb:latest
# Specify environment file for compose setup
env_file: ./db/configs/docker.moonstreamdb.env
environment:
ALEMBIC_CONFIG: ./configs/alembic.moonstreamdb.ini
depends_on:
db:
condition: service_healthy
# DB postgres application
db:
image: postgres:13
ports:
- "127.0.0.1:5432:5432"
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: moonstream_dev
healthcheck:
test: ["CMD", "psql", "-U", "postgres", "-c", "SELECT 1;"]
interval: 5s
timeout: 1s
retries: 3
start_period: 2s