I am having difficulty getting Wiki.js hosted on my server.
My current setup is using Docker Compose utilising a reverse proxy with the eventual aim to host some services for personal use. I have successfully managed to host Portainer (using a guide). And I can host Wiki.js in its own docker container (via Docker Compose), but adding the service together is failing with a 502
error. Portainer is still working, however.
I'm not sure where I am going wrong adding the service to the docker compose file.
Here is the docker-compose.yml
file:
version: '2'
services:
proxy:
image: jwilder/nginx-proxy
container_name: proxy
restart: unless-stopped
labels:
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- certs:/etc/nginx/certs:rw
- vhost.d:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- ./uploadsize.conf:/etc/nginx/conf.d/uploadsize.conf:ro
ports:
- "80:80"
- "443:443"
networks:
- "default"
- "proxy-tier"
proxy-letsencrypt:
image: jrcs/letsencrypt-nginx-proxy-companion
container_name: letsencrypt
restart: unless-stopped
environment:
- NGINX_PROXY_CONTAINER=proxy
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
volumes_from:
- "proxy"
depends_on:
- "proxy"
networks:
- "default"
- "proxy-tier"
portainer:
image: portainer/portainer
container_name: portainer
restart: always
environment:
- VIRTUAL_HOST=docker.example.com
- LETSENCRYPT_HOST=docker.example.com
- [email protected]
volumes:
- ./portainer/:/data
- /var/run/docker.sock:/var/run/docker.sock
ports:
- "9000:9000"
## Wiki.js specific container (db)
db:
image: postgres:11-alpine
container_name: wiki
environment:
POSTGRES_DB: wiki
POSTGRES_PASSWORD: wikijsrocks
POSTGRES_USER: wikijs
logging:
driver: "none"
restart: unless-stopped
volumes:
- db-data:/var/lib/postgresql/data
## Wiki.js specific container (app)
wiki:
image: requarks/wiki:2
depends_on:
- db
environment:
DB_TYPE: postgres
DB_HOST: db
DB_PORT: 5432
DB_USER: wikijs
DB_PASS: wikijsrocks
DB_NAME: wiki
VIRTUAL_HOST: wiki.example.ml
LETSENCRYPT_HOST: wiki.example.ml
LETSENCRYPT_EMAIL: [email protected]
restart: always
ports:
- "8010:3000"
volumes:
certs:
vhost.d:
html:
db-data:
networks:
proxy-tier: