Last active
May 12, 2022 12:13
-
-
Save ed-parsadanyan/0da84f2696c14f7856a308fcd4f72582 to your computer and use it in GitHub Desktop.
Example of Docker Compose file with several services and NGINX reverse proxy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.5' | |
services: | |
nginx: | |
image: nginx | |
restart: always | |
volumes: | |
- './nginx.conf:/etc/nginx/nginx.conf:z' | |
- './config/container/letsencrypt:/etc/letsencrypt:z' | |
- 'certbot_data:/var/www/certbot' | |
ports: | |
- ${HTTP_PORT}:80 | |
- ${HTTPS_PORT}:${HTTPS_PORT} | |
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'" | |
certbot: | |
image: certbot/certbot | |
restart: unless-stopped | |
volumes: | |
- './config/container/letsencrypt:/etc/letsencrypt' | |
- 'certbot_data:/var/www/certbot' | |
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'" | |
n8n: | |
image: n8nio/n8n | |
restart: always | |
environment: | |
- NODE_ENV=production | |
- DB_SQLITE_VACUUM_ON_STARTUP=true | |
- EXECUTIONS_DATA_SAVE_ON_SUCCESS=none | |
- N8N_USER_MANAGEMENT_DISABLED=true | |
- N8N_BASIC_AUTH_ACTIVE=true | |
- N8N_BASIC_AUTH_USER | |
- N8N_BASIC_AUTH_PASSWORD | |
- N8N_HOST | |
- N8N_PROTOCOL | |
- N8N_PORT | |
- N8N_LOG_OUTPUT | |
- N8N_LOG_FILE_LOCATION | |
- GENERIC_TIMEZONE | |
- VUE_APP_URL_BASE_API=${N8N_PROTOCOL}://${N8N_HOST}/ | |
- WEBHOOK_TUNNEL_URL=${N8N_PROTOCOL}://${N8N_HOST}/ | |
- WEBHOOK_URL=${N8N_PROTOCOL}://${N8N_HOST}/ | |
volumes: | |
- './.n8n:/home/node/.n8n' | |
- './n8n-local-files:/files' | |
nocodb: | |
image: nocodb/nocodb | |
restart: always | |
environment: | |
- NC_DISABLE_TELE=true | |
volumes: | |
- './nocodb-local:/usr/app/data' | |
volumes: | |
certbot_data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment