Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Production setup at AWS for thousands of users
- 3-4x m4.large for Node (ECS Cluster)
- 3x r4.large for Mongo (1 Primary for read and write, 2 replicas)
This setup runs very well for thousands of users.
Mongo URL AND Oplog settings
From comment at issue: We've fixed our CPU usage problem today with an environment change around Wekan. I wasn't aware during implementation that if you're using more than 1 instance of Wekan (or any MeteorJS based tool) you're supposed to set MONGO_OPLOG_URL as an environment variable. Without setting it, Meteor will perform a pull-and-diff update of it's dataset. With it, Meteor will update from the OPLOG. See here https://blog.meteor.com/tuning-meteor-mongo-livedata-for-scalability-13fe9deb8908
After setting in docker-compose.yml:
the CPU usage for all Wekan instances dropped to an average of less than 10% with only occasional spikes to high usage (I guess when someone is doing a lot of work)
- MONGO_URL=mongodb://wekandb:27017/wekan - MONGO_OPLOG_URL=mongodb://<username>:<password>@<mongoDbURL>/local?authSource=admin&replicaSet=rsWekan
For Enterprises using Wekan xet7 recommends participating in Wekan development, see Benefits of contributing your features to Upstream Wekan, having your own developers working on Wekan daily, and using Commercial Support at https://wekan.team , as Wekan Team already has access to high performance bare metal servers at CNCF / Packet for running high load testing. With the benefits you get by using Wekan, it’s time well spent. Some DTrace and eBPF info here.
Single Server Install for small teams
Add AWS Security Group with for example name wekan, and incoming ports 80 and 443 for all. Only add ssh access to your own IP address CIDR like 18.104.22.168/32 so it means one IP address.
Start Ubuntu 17.10 64bit EC2 instance that has at least 2 GB RAM, 30 GB diskspace, probably you need more when you add more customers. Add your SSH public key to instance or let it create new.
Add new Elastic IP address pointing to your EC2 instance. That way IP address stays same, and you can also make snapshot of EC2 instance and start that as new EC2 instance with more RAM and change Elastic IP to point to new EC2 instance with minimal downtime, but prefer times when there is no active changes to Wekan.
Set your subdomain.yourdomain.com address DNS pointing to your Elastic IP address as A record in Route 53, Namecheap or elsewhere where your domain control panel is. It will take max 24h for DNS to propagate globally.
ssh to your server, for example:
ssh -i pubkey.pem ubuntu@server-ip-address (or: root@)
- Update all packages:
sudo apt update sudo apt -y dist-upgrade reboot
Install Docker CE and docker-compose for ubuntu from www.docker.com , also add user ubuntu to group docker in post-install step.
Install nginx, for example:
sudo apt install nginx (or: nginx-full) sudo systemctl start nginx sudo systemctl enable nginx
Example nginx config at: https://github.com/wekan/wekan/wiki/Nginx-Webserver-Config
Test nginx config with:
sudo nginx -t
And take config into use with:
sudo systemctl reload nginx
Install certbot from https://certbot.eff.org for Let's Encrypt SSL certs, redirect http to https
For different customers, you use different location /customer1 2 etc block and wekan running behind nginx proxy on different localhost port in same nginx virtualhost subdomain config file.
Get latest wekan release info from https://github.com/wekan/wekan/releases , read docker-compose.yml file from https://github.com/wekan/wekan-mongodb where all settings are explained, so you setup ROOT_URL=https://sub.yourdomain.com/customer1 and for example the 8080:80 for local server port 8080 to go inside docker port 80.
For example Wekan v0.70, use in docker-compose.yml file: image: quay.io/wekan/wekan:v0.70 Only use release version tags, because latest tag can be broken sometimes.
For email, in AWS SES add email address to domain, verify SPF and DKIM with Route53 wizard if you have domain at Route53 as I recommend. At SES create new SMTP credentials and add them to docker-compose.yml SMTP settings, see https://github.com/wekan/wekan/wiki/Troubleshooting-Mail
Start wekan and mongodb database containers with command:
docker-compose up -d
So it goes nginx SSL port 443 => proxy to localhost port 8080 or any other => wekan-app port 80 inside docker
For different customers have different docker-compose.yml script in directories named by customer names. You may need to rename docker containers from wekan-app to wekan-customer1 etc, and probably also docker internal network names.
Backup, restore, and moving data outside/inside docker https://github.com/wekan/wekan/wiki/Export-Docker-Mongo-Data
Register as user at https://subdomain.yourdomain.com/customer1/sign-up and login at https://subdomain.yourdomain.com/customer1/sign-in , first user will be admin. Click your username at top right corner / Admin Panel, and there chang settings to invite only.
- Go to directory where docker-compose.yml is, as in install step 14) , and create directory for backup
cd wekan-customer1 mkdir backup-2018-02-03 cd backup-2018-02-03
Make backup of database outside docker in that backup directory, as in install step 15)
Edit docker-compose.yml to have new Wekan release number:
- Restart Wekan:
docker-compose stop docker-compose start
Login to Wekan and check at Admin Panel that Wekan version is updated.
If version is not updated, you could also need some of these:
Seeing what Docker containers are running:
Seeing what Docker images are installed:
Stopping containers (or start, if starting containers)
docker stop wekan-app docker stop CONTAINER-ID-HERE
docker rm wekan-app docker rm CONTAINER-ID-HERE
docker rmi quay.io/wekan/wekan:latest docker rmi quay.io/wekan/wekan:v0.70
Starting new containers from docker-compose.yml file:
docker-compose up -d