forked from itatmisis/gitregator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
60 lines (58 loc) · 1.26 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
#docker-compose file for local development
version: "3.3"
services:
client:
image: nginx
ports:
- 8000:80
volumes:
- ./web:/usr/share/nginx/html
postgresql_db:
image: postgres:latest
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_NAME}
- PGPORT=${DB_PORT}
ports:
- 6532:${DB_PORT}
restart: always
volumes:
- "database-data:/var/lib/postgresql/data/"
app:
build: ./api
environment:
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
- DB_NAME=${DB_NAME}
- DB_HOST=postgresql_db
- DB_PORT=${DB_PORT}
- ASPNETCORE_ENVIRONMENT=${ENVIRONMENT}
ports:
- "1001:80"
links:
- postgresql_db:${DB_HOST}
depends_on:
- app-migrate
volumes:
- "app-data:/root/"
app-migrate:
build: ./api
environment:
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
- DB_NAME=${DB_NAME}
- DB_HOST=postgresql_db
- DB_PORT=${DB_PORT}
- ASPNETCORE_ENVIRONMENT=Migration
ports:
- "1002:80"
links:
- postgresql_db:${DB_HOST}
depends_on:
- postgresql_db
volumes:
- "app-data:/root/"
volumes:
app-data:
database-data: