forked from bh-coders/trip-planer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
88 lines (82 loc) · 2.14 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
version: "3.11"
services:
postgres:
container_name: postgres-triplane
image: postgres:14.6
hostname: postgres
ports:
- "5432:5432"
- "5433:5432"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: triplane
POSTGRES_DB: postgres-triplane
volumes:
- postgres_data:/var/lib/postgresql/data
restart: on-failure
profiles: ["dev", "postgres", "dev-less"]
redis:
image: redis
container_name: redis
build:
context: ./backend/docker/redis
dockerfile: Dockerfile
privileged: true
env_file:
- ./backend/.env
- ./backend/.env.local
ports:
- "6379:6379"
volumes:
- redis_data:/data:rw
healthcheck:
test: redis-cli ping
interval: 3s
timeout: 5s
retries: 5
profiles: ["dev", "redis", "dev-less"]
minio:
container_name: minio
image: minio/minio:latest
ports:
- "9000:9000"
- "9001:9001"
volumes:
- minio_data:/data
environment:
MINIO_ROOT_USER: superuser
MINIO_ROOT_PASSWORD: superuser
command: server /data --console-address ":9001"
profiles: ["dev", "minio", "dev-less"]
backend: &backend
build:
context: ./backend
dockerfile: ./docker/web/Dockerfile
container_name: backend
stdin_open: true
tty: true
depends_on: [postgres, redis, minio]
env_file:
- ./backend/.env
- ./backend/.env.local
ports:
- "8000:8000"
volumes:
- ./backend/src:/src
profiles: ["dev"]
api:
<<: *backend
container_name: api
environment:
FASTAPI_HOST: 0.0.0.0
FASTAPI_PORT: 8081
ports:
- "8081:80"
depends_on: []
env_file:
- backend/.env
profiles: ["api"]
volumes:
postgres_data:
redis_data:
minio_data: