-
Notifications
You must be signed in to change notification settings - Fork 233
Looking for docker-compose complete example w/ rev. proxy #12
Comments
Here's what we use with great success. version: '2.1'
services:
redacted-nginx-proxy:
image: nginx-proxy:938d638e5c4d0dd98105bb15838cb5481de70a80
container_name: redacted-nginx-proxy
ports:
- 80:80
- 443:443
volumes:
- ./conf/vhost.d:/etc/nginx/vhost.d
- ./conf/html:/usr/share/nginx/html
- ./conf/certs:/etc/nginx/certs:ro
- ./logs:/var/log/nginx
- /var/run/docker.sock:/tmp/docker.sock:ro
environment:
- ZABBIX_HOSTNAME=redacted-nginx-proxy
networks:
- proxy-tier
restart: always
labels:
- "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy=true"
redacted-letsencrypt-companion:
image: jrcs/letsencrypt-nginx-proxy-companion
container_name: redacted-letsencrypt-companion
volumes_from:
- redacted-nginx-proxy
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./conf/certs:/etc/nginx/certs:rw
restart: always
networks:
proxy-tier:
external:
name: nginx-proxy |
Thanks. And just before I pull the trigger, does this make sense
|
edit: commented 80 ... do I have to use expose: - 80? |
Looks like you are going to use the embedded DB, so you'll want to uncomment the part where it says:
You'll want to get rid of the containers (freepbx-db and freepbx-db-backup) though. I use the external DB (non embedded) and added it the internal DB feature "because I could", but don't have much experience with using it in this docker image. Personally I like to seperate them. |
I see. I guess I should set that up and stick with what works, then. Thanks +1+1 |
Good luck! We're succesfully using this on a development server (calling working, webrtc phone working) with a planned usage case of over 500 extensions in the next 60 days, so updates to this image will come in bursts as I add more settings. I'm currently on the hunt on how to get LDAP authentication to work for the user manager and plan to have an ability to inject custom themes / tweaks without having to modify the image shortly. Also, I usually build complicated images in Debian first and then switch over to Alpine after the fact. The Alpine image is 80% complete and 1/4 of the size.. |
Very cool. No matter for me since I have 2 extensions and at most ~5 concurrent calls. Keep up the good work – I'll let you know if I have any questions; many thanks for answering |
What I've got isn't hooking in to your compose file; could you provide a complete example using compose?
`version: "2"
services:
nginx:
restart: always
image: nginx
container_name: nginx
ports:
- "80:80"
- "443:443"
volumes:
- "/etc/nginx/conf.d"
- "/etc/nginx/vhost.d"
- "/usr/share/nginx/html"
- "./volumes/proxy/certs:/etc/nginx/certs:ro"
nginx-gen:
restart: always
image: jwilder/docker-gen
container_name: nginx-gen
volumes:
- "/var/run/docker.sock:/tmp/docker.sock:ro"
- "./volumes/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
letsencrypt-nginx-proxy-companion:
restart: always
image: jrcs/letsencrypt-nginx-proxy-companion
container_name: letsencrypt-nginx-proxy-companion
volumes_from:
- nginx
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "./volumes/proxy/certs:/etc/nginx/certs:rw"
environment:
- NGINX_DOCKER_GEN_CONTAINER=nginx-gen
networks:
proxy-tier:
external:
name: nginx-proxy`
The text was updated successfully, but these errors were encountered: