-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
86 lines (80 loc) · 2.1 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
version: "2.1"
services:
nginx:
image: nginx
container_name: nginx
restart: always
ports:
- "8080:80"
- "8443:443"
networks:
- docker_net
volumes:
- /etc/nginx/conf.d
- /etc/nginx/vhost.d
- /usr/share/nginx/html
- ./server/proxy/htpasswd:/etc/nginx/htpasswd
- ./server/proxy/certs:/etc/nginx/certs:ro
- ./server/proxy/timeout.conf:/etc/nginx/conf.d/timeout.conf
nginx-gen:
image: jwilder/docker-gen
container_name: nginx-gen
restart: always
networks:
- docker_net
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./server/proxy/templates/nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro
volumes_from:
- nginx
entrypoint: /usr/local/bin/docker-gen -notify-sighup nginx -watch -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
nginx-letsencrypt:
image: jrcs/letsencrypt-nginx-proxy-companion
container_name: nginx-letsencrypt
restart: always
networks:
- docker_net
volumes_from:
- nginx
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./server/proxy/certs:/etc/nginx/certs:rw
environment:
- NGINX_DOCKER_GEN_CONTAINER=nginx-gen
- NGINX_PROXY_CONTAINER=nginx
mongodb:
image: mongo
container_name: mongodb
restart: always
networks:
- docker_net
volumes:
- ./server/db/mongodb:/data/db
mongodbadmin:
image: mongo-express
container_name: mongodbadmin
restart: always
cpu_shares: 10
mem_limit: 524288000
networks:
- docker_net
links:
- mongodb:mongo
depends_on:
- mongodb
environment:
- VIRTUAL_HOST=${MONGODB_HOSTNAME}
- VIRTUAL_NETWORK=docker_net
- LETSENCRYPT_HOST=${MONGODB_HOSTNAME}
- LETSENCRYPT_EMAIL=${OFFICE_EMAIL}
- ME_CONFIG_BASICAUTH_USERNAME=${MONGODB_USER}
- ME_CONFIG_BASICAUTH_PASSWORD=${MONGODB_PASS}
redisstore:
image: redis
container_name: redisstore
restart: always
networks:
- docker_net
networks:
docker_net:
external: true