brmkan/docker-compose.yml

115 lines
4.1 KiB
YAML

version: '2'
services:
# 1) Create a dedicated user for Wekan, for example:
# sudo useradd -d /home/wekan -m -s /bin/bash wekan
# 2) Add this user to the docker group, then logout+login or reboot:
# sudo usermod -aG docker wekan
# 3) Then login as user wekan.
# 4) Create this file /home/wekan/docker-compose.yml with your modifications.
# 5a) Running Docker as service, on Systemd like Debian 9, Ubuntu 16.04, CentOS 7:
# sudo systemctl enable docker
# sudo systemctl start docker
# 5b) Running Docker as service, on init.d like Debian 8, Ubuntu 14.04, CentOS 6:
# sudo update-rc.d docker defaults
# sudo service docker start
# 6) For seeing does Wekan work, try this and check with your webbroser:
# docker-compose up
# 7) Stop Wekan and start Wekan in background:
# docker-compose stop
# docker-compose up -d
# 8) See running Docker containers:
# docker ps
# 9) See stopped Docker containers:
# docker ps -a
# Upgrading Wekan to new version:
# 1) Stop Wekan:
# docker-compose stop
# 2) Download new version:
# docker-compose pull wekan
# 3) If you have more networks for VPN etc as described at bottom of
# this config, download for them too:
# docker-compose pull wekan2
# 4) Start Wekan:
# docker-compose start
wekandb:
# All Wekan data is stored in MongoDB. For backup and restore, see:
# https://github.com/wekan/wekan/wiki/Export-Docker-Mongo-Data
image: mongo:3.2.18
container_name: wekan-db
restart: always
command: mongod --smallfiles --oplogSize 128
networks:
- wekan-tier
expose:
- 27017
volumes:
- wekan-db:/data/db
- wekan-db-dump:/dump
wekan:
# Wekan container only has Node.js and related code,
# there is no data stored here.
#
# Old Wekan that uses Node 4.8.6 and Meteor 1.4:
image: wekanteam/wekan:latest
# New Wekan that uses Node 6.12 and Meteor 1.6:
# image: wekanteam/wekan:meteor-1.6
container_name: wekan-app
restart: always
networks:
- wekan-tier
#---------------------------------------------------------------
# For running Wekan in different port like 3000, use: 3000:80
ports:
- 80:80
#---------------------------------------------------------------
# Change ROOT_URL to your real Wekan URL, for example:
# http://example.com
# http://example.com/wekan
# http://192.168.1.100
#---------------------------------------------------------------
# Email settings are required in both MAIL_URL and Admin Panel,
# see https://github.com/wekan/wekan/wiki/Troubleshooting-Mail
# For SSL in email, change smtp:// to smtps://
#---------------------------------------------------------------
# Not needed on Docker, but if you had installed from source,
# you could also have setup Wekan Node.js port at localhost
# with setting: PORT=3000
# and have Nginx proxy to port 3000, see Wekan wiki.
environment:
- MONGO_URL=mongodb://wekandb:27017/wekan
- ROOT_URL=http://example.com
- MAIL_URL=smtp://user:pass@mailserver.example.com:25/
- MAIL_FROM='Example Wekan Support <support@example.com>'
depends_on:
- wekandb
#------------------------------------------------------------------
# When using Wekan both at office LAN and remote VPN:
# 1) Have above Wekan docker container config with LAN IP address
# 2) Copy all of above Wekan config below, change name to different
# like wekan2 or wekanvpn, and change ROOT_URL to server VPN IP
# address.
# 3) This way both Wekan containers can use same MongoDB database
# and see the same Wekan boards.
# 4) You could also add 3rd Wekan container for 3rd network etc.
#------------------------------------------------------------------
# wekan2:
# ....COPY CONFIG FROM ABOVE TO HERE...
# environment:
# - ROOT_URL='http://10.10.10.10'
# ...COPY CONFIG FROM ABOVE TO HERE...
volumes:
wekan-db:
driver: local
wekan-db-dump:
driver: local
networks:
wekan-tier:
driver: bridge