-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
54 lines (46 loc) · 1.53 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
51
52
53
54
version: "3"
services:
web_api:
profiles: [web_api, worker]
container_name: amdb_backend.web_api
depends_on: [postgres, redis, worker]
ports: ["${SERVER_HOST:-0.0.0.0}:${SERVER_PORT:-8000}:8000"]
restart: unless-stopped
build:
context: ./
dockerfile: ./Dockerfile
target: web_api
volumes:
- ${CONFIG_PATH}:/app/config/prod_config.toml:ro
environment:
- CONFIG_PATH=./config/prod_config.toml
worker:
profiles: [web_api, worker]
container_name: amdb_backend.worker
depends_on: [postgres, redis]
restart: unless-stopped
build:
context: ./
dockerfile: ./Dockerfile
target: worker
volumes:
- ${CONFIG_PATH}:/app/config/prod_config.toml:ro
environment:
- CONFIG_PATH=./config/prod_config.toml
postgres:
profiles: [web_api, worker]
container_name: amdb_backend.postgres
image: postgres:15-alpine
restart: unless-stopped
environment:
- POSTGRES_USER=${POSTGRES_USER:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-1234}
- POSTGRES_DB=${POSTGRES_DB:-amdb}
redis:
profiles: [web_api, worker]
container_name: amdb_backend.redis
image: bitnami/redis:7.2
restart: unless-stopped
environment:
- REDIS_PASSWORD=${REDIS_PASSWORD:-1234}
- REDIS_PORT_NUMBER=${REDIS_PORT:-6379}