-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
87 lines (81 loc) · 1.53 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
83
84
85
86
87
version: "3"
services:
# Component Libray
components:
build: .
command: yarn storybook
container_name: components
environment:
- VIRTUAL_HOST=mmcgrath.io
- VIRTUAL_PATH=/components
- VIRTUAL_PORT=3001
- VIRTUAL_DEST=/
ports:
- 3001
volumes:
- .:/app
- .:/app:cached
- node_modules:/app/node_modules
- /.storybook
networks:
- mmdev
# NextJS Portfolio
portfolio:
build: .
command: yarn dev -p 443
container_name: portfolio
links:
- mongodb
depends_on:
- mongodb
environment:
- VIRTUAL_HOST=mmcgrath.io
- VIRTUAL_PATH=/
- VIRTUAL_PORT=443
ports:
- 443
volumes:
- .:/app
- .:/app:cached
- node_modules:/app/node_modules
- /.next
networks:
- mmdev
nginx-proxy:
build:
context: ./nginx-proxy/
dockerfile: Dockerfile
container_name: nginx-proxy
depends_on:
- components
- portfolio
- mongodb
ports:
- "443:443"
- "80:80"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./nginx-proxy/certs:/etc/nginx/certs
networks:
- mmdev
mongodb:
container_name: mongodb
env_file: .env.local
image: mongo:latest
volumes:
- ~/mongo:/data/db
ports:
- "27017:27017"
environment:
VIRTUAL_PORT: 27017
networks:
- mmdev
volumes:
components:
portfolio:
nginx-proxy:
node_modules:
mongodb-data:
networks:
mmdev:
driver: bridge