Vi Nguyen's Dev Notes
  • 📓Dev Notes
    • Buy me a coffee
  • Deployment & Operation
    • Docker Container
      • Add User to Docker Group
      • Clean up unused docker images
      • Backup Container
      • Truncate docker log
    • Git
    • Ansible
      • Ansible - Setup fresh new ubuntu server
      • Run Ansible Playbook on MacOS
    • Linux
      • Zip file with Gzip
      • Linux - add user to sudo group
      • Rsync - copy file on remote server to local
      • Tunnel all docker ports on remote server to localhost
      • Create linux Swapfile
      • Rename a file to folder name
      • Copy and keep permission on linux
    • Database
      • Check if database is reachable with nc
      • PostgreSQL
        • PostgreSQL - Create a new primary key auto-increment column
        • Generate uuid for all records in a table PostgreSQL
        • Backup & Import all database PostgreSQL Inside Docker Container
        • Backup & Import single database PostgreSQL Inside Docker Container
        • PostgreSQL - Create user & grant permission on a database
        • PostgeSQL - Backup database via remote ssh server
      • Mysql
        • Mysql - Create user & grant permission on a database
        • Dump & import Mysql database inside container
        • Mysql - Dump all Mysql database from Mysql
    • Ngnix
      • Nginx - 504 Gateway Timeout error using Nginx as Proxy
      • Download file from server via nginx docker
  • Docker-compose samples
    • docker-compose - n8n
    • docker-compose - PostgreSQL
    • docker-compose caddy as reverse proxy
  • Homelab
    • Rasberry Pi 4B - Bookworm HDMI config
    • Waveshare 3.5" display on Pi 4 -Bookworm 64 Bit
  • Development
    • Development Notes
  • My Resources
    • Blog
    • Geek Tools
    • Dev Note Github Repo
Powered by GitBook
On this page
  1. Docker-compose samples

docker-compose - n8n

version: "3"
services:

  n8n:
    image: n8nio/n8n
    restart: always
    ports:
      - "5678:443"
    environment:
      - N8N_BASIC_AUTH_ACTIVE=true
      - N8N_BASIC_AUTH_USER
      - N8N_BASIC_AUTH_PASSWORD
      - N8N_HOST=${SUBDOMAIN}.${DOMAIN_NAME}
      - N8N_PORT=443
      - N8N_PROTOCOL=https
      - NODE_ENV=production
      - WEBHOOK_URL=https://${SUBDOMAIN}.${DOMAIN_NAME}/
      - GENERIC_TIMEZONE=${GENERIC_TIMEZONE}
    volumes:
      - ${DATA_FOLDER}/.n8n:/home/node/.n8n
  nodedb:
    image: mysql:8.0.32
    container_name: nodedb
    restart: always
    ports:
      - "3306:3306"
    environment:
      MYSQL_DATABASE: nodedb
      MYSQL_ROOT_PASSWORD: you_root_pass_work
    volumes:
      - ${NODEDB_DATA_FOLDER}:/var/lib/mysql

Last updated 1 year ago