-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.dev.yml
75 lines (72 loc) · 1.51 KB
/
docker-compose.dev.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
version: '3'
services:
proxy:
container_name: proxy
build:
context: ./dev-dependencies/nginx
dockerfile: Dockerfile
restart: unless-stopped
ports:
- 80:80
volumes:
- ./nginx/production:/etc/nginx/conf.d
networks:
- web
command: '/bin/sh -c ''while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g "daemon off;"'''
depends_on:
- api
- nuxt
postgres:
container_name: postgres
image: postgres:10.8
restart: always
expose:
- 5432
environment:
POSTGRES_USER: 'pguser'
POSTGRES_PASSWORD: 'pguserpass'
POSTGRES_DB: 'dotnetcoredocker'
volumes:
- pgdata:/var/lib/postgresql/data
- ./scripts/init.sql:/docker-entrypoint-initdb.d/init.sql
networks:
- internal
api:
container_name: api
build:
context: ./core
dockerfile: Dockerfile
restart: always
expose:
- 80
environment:
DB_CONNECTION_STRING: 'Server=postgres;Port=5432;Database=dotnetcoredocker;User Id=pguser;Password=pguserpass'
PORT: 80
depends_on:
- postgres
networks:
- internal
- web
nuxt:
container_name: nuxt
build:
context: ./nuxt
dockerfile: Dockerfile
restart: always
expose:
- 3000
environment:
HOST: 0.0.0.0
NODE_ENV: production
command: 'npm run start'
depends_on:
- api
networks:
- web
volumes:
pgdata:
networks:
internal:
web:
external:
name: nginx_web