-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yaml
56 lines (49 loc) · 1.1 KB
/
docker-compose.dev.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
55
56
version: "3.9"
services:
redis:
image: redis
restart: always
postgres:
image: postgres
volumes:
- postgres_volume:/var/lib/postgresql/data/
environment:
POSTGRES_USER: my_vocab_db_user
POSTGRES_PASSWORD: my_vocab_db_password
POSTGRES_DB: my_vocab
restart: always
migration:
build:
context: .
target: main
env_file:
- .env.dev
environment:
APP_ENV: dev
DB_URL: postgresql://my_vocab_db_user:my_vocab_db_password@postgres:5432/my_vocab
REDIS_URL: redis://redis:6379/
depends_on:
- postgres
command: pipenv run alembic upgrade head
restart: on-failure
uvicorn:
build:
context: .
target: main
ports:
- "8000:8000"
env_file:
- .env.dev
environment:
APP_ENV: dev
APP_HOST: 0.0.0.0
APP_PORT: 8000
UVICORN_RELOAD: 0
DB_URL: postgresql://my_vocab_db_user:my_vocab_db_password@postgres:5432/my_vocab
REDIS_URL: redis://redis:6379/
depends_on:
- redis
- migration
restart: always
volumes:
postgres_volume: