Skip to content

Instantly share code, notes, and snippets.

@nachocodexx
Created April 19, 2021 01:26
Show Gist options
  • Save nachocodexx/7833cdecf430fa4fa86243b6590759be to your computer and use it in GitHub Desktop.
Save nachocodexx/7833cdecf430fa4fa86243b6590759be to your computer and use it in GitHub Desktop.
Docker compose file for ewixi production deployment
version: "3"
services:
app:
image: nachocode/ewixi
restart: unless-stopped
networks:
- ewixi-network
ports:
- 4000:4000
webserver:
image: nginx:mainline-alpine
container_name: webserver
restart: unless-stopped
ports:
- 80:80
- 443:443
volumes:
- web-root:/var/www/html
- dhparam:/etc/ssl/certs
- /home/ubuntu/nginx:/etc/nginx/conf.d
- certbot-etc:/etc/letsencrypt
- certbot-var:/var/lib/letsencrypt
depends_on:
- app
networks:
- ewixi-network
certbot:
image: certbot/certbot
container_name: certbot
volumes:
- certbot-etc:/etc/letsencrypt
- certbot-var:/var/lib/letsencrypt
- web-root:/var/www/html
depends_on:
- webserver
command: certonly --webroot --webroot-path=/var/www/html --email [email protected] --agree-tos --no-eff-email --force-renewal -d api.ewixi.com
volumes:
certbot-etc:
certbot-var:
web-root:
driver: local
driver_opts:
type: none
device: /home/ubuntu/webroot
o: bind
dhparam:
driver: local
driver_opts:
type: none
device: /home/ubuntu/dhparam
o: bind
networks:
ewixi-network:
driver: bridge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment