mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-26 21:19:43 -08:00
6d5ea0634c
* ci: Use the same entrypoint for custom docker images as for the other images * update docker-compose examples to use the correct volume paths to work with custom images
44 lines
946 B
YAML
44 lines
946 B
YAML
version: '3.8'
|
|
|
|
volumes:
|
|
db_storage:
|
|
n8n_storage:
|
|
|
|
services:
|
|
db:
|
|
image: mariadb:10.7
|
|
restart: always
|
|
environment:
|
|
- MARIADB_ROOT_PASSWORD
|
|
- MARIADB_DATABASE
|
|
- MARIADB_USER
|
|
- MARIADB_PASSWORD
|
|
- MARIADB_MYSQL_LOCALHOST_USER=true
|
|
volumes:
|
|
- db_storage:/var/lib/mysql
|
|
healthcheck:
|
|
test: "/usr/bin/mysql --user=${MARIADB_USER} --password=${MARIADB_PASSWORD} --execute 'SELECT 1;'"
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 10
|
|
|
|
n8n:
|
|
image: n8nio/n8n
|
|
restart: always
|
|
environment:
|
|
- DB_TYPE=mariadb
|
|
- DB_MYSQLDB_HOST=db
|
|
- DB_MYSQLDB_DATABASE=${MARIADB_DATABASE}
|
|
- DB_MYSQLDB_USER=${MARIADB_USER}
|
|
- DB_MYSQLDB_PASSWORD=${MARIADB_PASSWORD}
|
|
ports:
|
|
- 5678:5678
|
|
links:
|
|
- db
|
|
volumes:
|
|
- n8n_storage:/home/node/.n8n
|
|
command: n8n start --tunnel
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|