-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
53 lines (52 loc) · 1.49 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
version: "3.1"
services:
friendstagram:
image: friendstagram/backend
restart: on-failure
ports:
- "8080:8080"
depends_on:
- friendstagram-db
links:
- friendstagram-db
friendstagram-db:
image: postgres:latest
environment:
- POSTGRES_USER_FILE=/run/secrets/dev_db_user
- POSTGRES_PASSWORD_FILE=/run/secrets/dev_db_password
- POSTGRES_DB_FILE=/run/secrets/dev_db
ports:
- "5432:5432"
volumes:
- ./Database/db.sql:/docker-entrypoint-initdb.d/db.sql
secrets:
- dev_db_user
- dev_db_password
- dev_db
friendstagram-db-test:
image: postgres:latest
environment:
- POSTGRES_USER_FILE=/run/secrets/test_db_user
- POSTGRES_PASSWORD_FILE=/run/secrets/test_db_password
- POSTGRES_DB_FILE=/run/secrets/test_db
ports:
- "5433:5432"
volumes:
- ./Database/db.sql:/docker-entrypoint-initdb.d/db.sql
secrets:
- test_db_user
- test_db_password
- test_db
secrets:
dev_db_user:
file: ./secrets/dev/db_user.secret
dev_db_password:
file: ./secrets/dev/db_password.secret
dev_db:
file: ./secrets/dev/database.secret
test_db_user:
file: ./secrets/test/db_user.secret
test_db_password:
file: ./secrets/test/db_password.secret
test_db:
file: ./secrets/test/database.secret