-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
50 lines (45 loc) · 950 Bytes
/
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
x-common-variables: &common-variables
DATABASE_URL: "postgres://postgres@db/fakester"
REDIS_URL: "redis://redis:6379"
services:
db:
image: "postgres:15.1"
environment:
POSTGRES_HOST_AUTH_METHOD: "trust"
POSTGRES_DB: "fakester"
volumes:
- "postgres_data:/var/lib/postgresql/data/"
ports:
- "5432:5432"
redis:
image: "redis:7.0"
ports:
- "6379:6379"
app:
build:
context: "."
target: "app"
image: "fakester-app:latest"
command: "--reload"
environment: *common-variables
env_file: ".env"
volumes:
- ".:/home/fakester/app"
ports:
- "8000:8000"
depends_on:
- "db"
- "redis"
dev:
build:
context: "."
target: "dev"
image: "fakester-dev:latest"
environment: *common-variables
env_file: ".env"
volumes:
- ".:/home/fakester/app"
depends_on:
- "db"
volumes:
postgres_data: