-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
82 lines (77 loc) · 1.96 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
version: "3.7"
services:
app:
container_name: api
build:
args:
user: rickneves
uid: 1000
context: ./
dockerfile: Dockerfile
restart: unless-stopped
working_dir: /var/www/
volumes:
- ./:/var/www
networks:
- stock-exchange
depends_on:
- postgres
- nginx
postgres:
container_name: postgres
image: postgres
restart: always
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
POSTGRES_DB: stock_exchange
POSTGRES_PASSWORD: root
POSTGRES_USER: root
PGDATA: /var/lib/postgresql/data
ports:
- "5432:5432"
networks:
- stock-exchange
postgres-test:
container_name: postgres-test
image: postgres
restart: always
volumes:
- postgres-data:/var/lib/postgresql/data-test
environment:
POSTGRES_DB: stock_exchange_test
POSTGRES_PASSWORD: root
POSTGRES_USER: root
PGDATA: /var/lib/postgresql/data-test
ports:
- "5431:5432"
networks:
- stock-exchange
postgresadmin:
container_name: postgresadmin
image: dpage/pgadmin4
ports:
- "5050:80"
depends_on:
- postgres
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: root
networks:
- stock-exchange
nginx:
container_name: nginx
image: nginx:alpine
restart: unless-stopped
ports:
- 8000:80
volumes:
- ./:/var/www
- ./.docker/nginx:/etc/nginx/conf.d
networks:
- stock-exchange
networks:
stock-exchange:
driver: bridge
volumes:
postgres-data: