Skip to content

Instantly share code, notes, and snippets.

@austinmccalley
Last active February 10, 2020 01:08
Show Gist options
  • Save austinmccalley/1a378d5e463af41669c62f3452b3838c to your computer and use it in GitHub Desktop.
Save austinmccalley/1a378d5e463af41669c62f3452b3838c to your computer and use it in GitHub Desktop.
version: '3'
services:
nodejs:
build:
context: .
dockerfile: Dockerfile
image: nodejs
container_name: nodejs
restart: unless-stopped
networks:
- app-network
webserver:
image: nginx:mainline-alpine
container_name: webserver
restart: unless-stopped
ports:
- "80:80"
volumes:
- web-root:/var/www/html
- ./nginx-conf:/etc/nginx/conf.d
- certbot-etc:/etc/letsencrypt
- certbot-var:/var/lib/letsencrypt
depends_on:
- nodejs
networks:
- app-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 --staging -d quedev.xyz -d www.quedev.xyz
volumes:
certbot-etc:
certbot-var:
web-root:
driver: local
driver_opts:
type: none
device: /home/austin/test_node_proj/views/
o: bind
networks:
app-network:
driver: bridge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment