Update readme

This commit is contained in:
Malanius 2018-09-09 12:50:14 +02:00
parent 47f565a5e9
commit 8f93067afd
2 changed files with 88 additions and 247 deletions

161
README.md
View file

@ -1,91 +1,106 @@
# Docker: Wekan <=> MongoDB
# brmkan
* [Wekan kanban board, made with Meteor.js framework, running on
Node.js](https://wekan.io) -- [GitHub](https://github.com/wekan/wekan)
* [MongoDB NoSQL database](https://www.mongodb.com)
## Test
## Screenshot
Test instace is currently running on AWS EC2 instance: https://brmkan.malanius.net/ managed by **malanius**.
Content of this branch reflects that instance and it's settings.
![Screenshot of Wekan][screenshot]
## Useful links
* [wekan-mongo in AWS](https://github.com/wekan/wekan/wiki/AWS)
* [wekan-mongo repository](https://github.com/wekan/wekan-mongodb)
* [example nginx conf](https://github.com/wekan/wekan/wiki/Nginx-Webserver-Config)
* [letsencrypt certbot](https://certbot.eff.org/)
* [test SSL configuratioon](https://www.ssllabs.com/ssltest/index.html)
## Install
1) Install docker-compose.
1. Install docker-compose.
1. Clone this repo:
```bash
git clone https://github.com/brmlab/brmkan.git
cd brmkan
```
1. Checkout `brmkan` branch:
```bash
git checkout brmkan
```
1. Generate letsencrypt certificate with certbot.
1. Generate SSL dhparam
```bash
sudo openssl dhparam -out /etc/ssl/dh_param.pem 2048
```
1. Copy nginx configuration files.
1. Create a dedicated user for Wekan, for example:
```bash
sudo useradd -d /home/wekan -m -s /bin/bash wekan
```
1. Add this user to the docker group:
```bash
sudo usermod -aG docker wekan
```
1. Switch login as user wekan:
```bash
sudo su - wekan
```
1. Copy docker-compose.yml file to /home/wekan/docker-compose.yml
1. Modify the ROOT_URL and MAIL_* parameters as required.
1. Run in detached mode:
```bash
docker-compose up -d
```
2) Clone this repo.
## Maitenance
```bash
git clone https://github.com/wekan/wekan-mongodb.git
cd wekan-mongodb
```
3a) Detached mode:
```bash
docker-compose up -d
```
3b) Running attached to console, so Ctrl-c stops it:
```bash
docker-compose up
```
4) Wekan is at http://localhost (port 80)
5) MongoDB is at 127.0.0.1:27017
6) Wekan and databases bind to address 0.0.0.0 so could be also available to other
computers in network. I have not tested this.
7) [Restore your MongoDB data](https://github.com/wekan/wekan/wiki/Export-Docker-Mongo-Data).
## Backup before upgrading
[Backup all data from MongoDB](https://github.com/wekan/wekan/wiki/Export-Docker-Mongo-Data)
## Upgrading Wekan
1) In wekan-mongodb directory, stop Wekan:
```bash
docker-compose stop
```
2) Check what is CONTAINER ID of wekanteam/wekan:latest container. Then remove container.
```bash
docker ps
docker rm CONTAINER-ID-HERE
```
3) Check Docker images, what is IMAGE ID of quay.io/wekan/wekan, and remove quay.io/wekan/wekan image:
```bash
docker images
docker rmi IMAGE-ID-HERE
```
4) If you have made backups of MongoDB container to outside of Docker, and want to upgrade MongoDB, you could also delete MongoDB container and image.
5) Start Wekan again in background:
```bash
docker-compose up -d
```
6) You can also check container logs:
### Check the logs
```bash
docker ps
docker logs CONTAINER-ID-OF-Wekan-or-MongoDB-HERE
```
7) Restore MongoDB data if needed.
### Data save/restore
## Feedback
* [Backup all data from MongoDB](https://github.com/wekan/wekan/wiki/Export-Docker-Mongo-Data)
* [Restore MongoDB data](https://github.com/wekan/wekan/wiki/Export-Docker-Mongo-Data)
[Create GitHub issue](https://github.com/wekan/wekan/issues)
### Upgrading wekan
[screenshot]: https://wekan.github.io/screenshot.png
1. Always backup the db before upgrading (see above)!
2. In brmkan directory, stop the running services:
```bash
docker-compose stop
```
3. Remove wekan container:
```bash
docker-compose rm wekan
```
4. Update the wekan image
```bash
docker-compose pull wekan
```
5. Start it again:
```bash
docker-compose up -d
```
### Upgrading MonmgoDB
1. Always backup the db before upgrading (see above)!
1. In brmkan directory, stop the running services:
```bash
docker-compose stop
```
1. Remove wekan container:
```bash
docker-compose rm wekandb
```
1. Update the MongoDB image
```bash
docker-compose pull wekandb
```
1. Start it again:
```bash
docker-compose up -d
```
1. Restore the data from created backup