Docker, Portainer, NGINX Proxy Manager Setup
In this tutorial we will setup Wiki|Docs with docker in a online virtual machine (or virtual private server) with Portainer and NginX Proxy Manager.
DNS configuration
Configure your domain or subdomain DNS with an A record pointing to the virtual machine IP address assigned by your provider
wikidocs.yourdomain.tld A 123.123.123.123
Docker networking
Create a network for all the application you want to be availabvle from the reverse proxy
docker network create --driver bridge reverse-proxy
Portainer setup
Create a volume for Portainer data
docker volume create portainer_data
Create a docker compose file for Portainer
nano portainer-docker-compose.yml
version: '3'
volumes:
portainer_data:
external: true
networks:
reverse-proxy:
external: true
services:
portainer:
image: portainer/portainer-ce:latest
container_name: portainer
hostname: portainer
restart: unless-stopped
volumes:
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- portainer_data:/data
networks:
- reverse-proxy
ports:
- 9000:9000
- 9443:9443
Execute Portainer
docker-compose -f portainer-docker-compose.yml -p portainer up -d
NGINX Proxy Manager setup
Create two volumes for NGINXPM: one for data and one for certificates
docker volume create nginxpm_data
docker volume create nginxpm_certificates
Create a docker compose file for NGINXPM
nano nginxpm-docker-compose.yml
version: '3'
volumes:
nginxpm_data:
external: true
nginxpm_certificates:
external: true
networks:
reverse-proxy:
external: true
services:
nginxpm:
image: jc21/nginx-proxy-manager:latest
container_name: nginxpm
hostname: nginxpm
restart: unless-stopped
volumes:
- nginxpm_data:/data
- nginxpm_certificates:/etc/letsencrypt
networks:
- reverse-proxy
ports:
- 80:80
- 81:81
- 443:443
Execute NGINXPM
docker-compose -f nginxpm-docker-compose.yml -p nginxpm up -d
Open the web application in your browser on http://ip_address_of_vm:81
and create a new Proxy Host
If you want, you can also enable https in the SSL tab
Wiki|Docs setup
Create a volume for Wiki|Docs datasets
docker volume create wikidocs-datasets
Create a docker compose file for Wiki|Docs
nano wikidocs-docker-compose.yml
version: '3'
volumes:
wikidocs_datasets:
external: true
networks:
reverse-proxy:
external: true
services:
wikidocs:
image: zavy86/wikidocs
container_name: wikidocs
hostname: wikidocs
restart: unless-stopped
environment:
- PUID=1000
- PGID=1000
volumes:
- wikidocs_datasets:/datasets
networks:
- reverse-proxy
Execute Wiki|Docs
docker-compose -f wikidocs-docker-compose.yml -p wikidocs up -d
Open your website to https://wikidocs.yourdomain.tld
and follow the setup instructions.
Finish!