generated from TimofeyTst/auth_api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
68 lines (59 loc) · 1.17 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
version: '3.7'
services:
rest_api:
container_name: rest_api
image: rest_api
env_file:
- .env
build:
context: .
dockerfile: Dockerfile
volumes:
- ./:/src
ports:
- "8000:8000"
depends_on:
- db
- redis
db:
container_name: db
hostname: db
image: library/postgres:14.1
environment:
- POSTGRES_USER=rest
- POSTGRES_PASSWORD=rest
- POSTGRES_DB=rest
volumes:
- eat_place_pg_data:/var/lib/postgresql/data
ports:
- "5432:5432"
redis:
image: redis:6.2-alpine
hostname: redis
container_name: redis
command:
- 'redis-server'
- '--requirepass myStrongPassword'
ports:
- 6379:6379
test_db:
container_name: test_db
hostname: test_db
image: library/postgres:14.1
environment:
- POSTGRES_USER=rest
- POSTGRES_PASSWORD=rest
- POSTGRES_DB=rest
volumes:
- eat_place_test_pg_data:/var/lib/postgresql/data
ports:
- "5433:5432"
volumes:
eat_place_pg_data:
driver: "local"
eat_place_test_pg_data:
driver: "local"
networks:
default:
external: true
name: eat_place