-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdocker-compose.yml
55 lines (50 loc) · 1.33 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
version: "3.3"
services:
backend_testing:
build:
context: backend
dockerfile: Dockerfile
image: backend
env_file:
- backend/.env
environment:
- ENV=DEV
- POSTGRES_DB=tests
depends_on:
- postgres_db
entrypoint: ["/bin/bash", "-c", "alembic upgrade head; pytest ./tests -vv"]
network_mode: host
backend:
build:
context: backend
dockerfile: Dockerfile
args:
INSTALL_DEV: ${INSTALL_DEV-true}
image: backend
container_name: backend
# restart: always
env_file:
- backend/.env
volumes:
- ./data:/app/data
depends_on:
- postgres_db
- redis
entrypoint: ["/bin/bash", "-c", "alembic upgrade head; python main.py"]
# entrypoint: ["/bin/bash", "-c", "bash scripts/prestart.sh"]
network_mode: host
postgres_db:
image: postgres
# restart: always
env_file: backend/.env
volumes:
- ./scripts/multiple_databases.sh:/docker-entrypoint-initdb.d/multiple_databases.sh
# - ./data:/var/lib/postgresql/data
network_mode: host
redis:
image: 'bitnami/redis:latest' # конфигурируется переменными среды
# restart: always
env_file: backend/.env
# volumes:
# - ./data:/var/lib/postgresql/data
network_mode: host