-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
84 lines (76 loc) · 2 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
#Docker-compose for Coderdojo project @ HVA
#add .env before running.
version: '2.0'
services:
#Websocket container
websocket:
build:
context: ./src/socket-server/
dockerfile: Dockerfile_websocket
image: little-endian/socket-server:latest
volumes:
- ./src/socket-server/:/usr/src/app
- /usr/src/app/node_modules
environment:
- VIRTUAL_HOST=${webSocketUrl}
- VIRTUAL_PORT=${webSocketPort}
# - LETSENCRYPT_HOST=${letsEncryptWebSocket}
networks:
- backend
#Webapp container
webapp:
build:
context: ./src/react-application/
dockerfile: Dockerfile_webapp
image: little-endian/react-application:latest
volumes:
- ./src/react-application/:/usr/src/app
- /usr/src/app/node_modules
environment:
- VIRTUAL_HOST=${webAppUrl}
- VIRTUAL_PORT=${webAppPort}
# - LETSENCRYPT_HOST=${letsEncryptWebApp}
networks:
- backend
#Proxy
nginx-proxy:
image: jwilder/nginx-proxy
container_name: nginx-proxy
ports:
- '80:80'
# - '443:443'
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- nginx-conf:/etc/nginx/conf.d
- nginx-vhost:/etc/nginx/vhost.d
- nginx-html:/usr/share/nginx/html
- nginx-gen-tmpl:/etc/docker-gen/templates/nginx.tmpl
- nginx-ssl:/etc/nginx/certs:ro
networks:
- backend
#Letsencrypt container
letsencrypt-nginx-proxy:
container_name: letsencrypt-nginx-proxy
image: 'jrcs/letsencrypt-nginx-proxy-companion'
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- nginx-conf:/etc/nginx/conf.d
- nginx-vhost:/etc/nginx/vhost.d
- nginx-html:/usr/share/nginx/html
- nginx-gen-tmpl:/etc/docker-gen/templates/nginx.tmpl
- nginx-ssl:/etc/nginx/certs:rw
networks:
- backend
environment:
- NGINX_PROXY_CONTAINER=nginx-proxy
#Volumes
volumes:
nginx-conf:
nginx-vhost:
nginx-html:
nginx-gen-tmpl:
nginx-ssl:
#Backend network
networks:
backend:
driver: bridge