version: "3" networks: nginx-proxy: volumes: nginx_conf: nginx_vhost: nginx_html: services: nginx-proxy: restart: always image: nginx container_name: nginx-proxy ports: - "80:80" # OPTIONAL: Change "left" number to use different port - "443:443" # OPTIONAL: Change "left" number to use different port volumes: - "nginx_conf:/etc/nginx/conf.d" - "nginx_vhost:/etc/nginx/vhost.d" - "nginx_html:/usr/share/nginx/html" - "/path/to/certs:/etc/nginx/certs:ro" # REQUIRED: Change "left" path - "/path/to/htpasswd:/etc/nginx/htpasswd" # REQUIRED: Change "left" path networks: nginx-proxy nginx-gen: restart: always image: jwilder/docker-gen container_name: nginx-gen depends_on: - nginx-proxy volumes: - "/var/run/docker.sock:/tmp/docker.sock:ro" # REQUIRED: On some OSs you will have to change "left" path - "/path/to/nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro" # REQUIRED: Change "left" path. See nginx image docs - "nginx_conf:/etc/nginx/conf.d" - "nginx_vhost:/etc/nginx/vhost.d" - "nginx_html:/usr/share/nginx/html" - "/path/to/certs:/etc/nginx/certs:ro" # REQUIRED: Change "left" path. Use the same path as in nginx-proxy - "/path/to/htpasswd:/etc/nginx/htpasswd" # REQUIRED: Change "left" path. Use the same path as in nginx-proxy entrypoint: /usr/local/bin/docker-gen -notify-sighup nginx-proxy -watch -wait 2s:5s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf networks: - nginx-proxy letsencrypt-nginx-proxy-companion: restart: always image: jrcs/letsencrypt-nginx-proxy-companion container_name: letsencrypt-nginx-proxy-companion depends_on: - nginx-proxy - nginx-gen volumes: - "/var/run/docker.sock:/var/run/docker.sock:ro" # REQUIRED: On some OSs you will have to change "left" path - "nginx_conf:/etc/nginx/conf.d" - "nginx_vhost:/etc/nginx/vhost.d" - "nginx_html:/usr/share/nginx/html" - "/path/to/certs:/etc/nginx/certs:rw" # REQUIRED: Change "left" path. Use the same path as in nginx-proxy - "/path/to/htpasswd:/etc/nginx/htpasswd" # REQUIRED: Change "left" path. Use the same path as in nginx-proxy environment: - NGINX_DOCKER_GEN_CONTAINER=nginx-gen - NGINX_PROXY_CONTAINER=nginx-proxy networks: - nginx-proxy dokuwiki: #image: mprasil/dokuwiki:latest build: context: ../dokuwikiapp args: - MAXPOST=30M # OPTIONAL: Change value to allow upload of bigger/smaller files - MAXFILE=30M # OPTIONAL: Change value to allow upload of bigger/smaller files container_name: dokuwiki #ports: # - "80:80" restart: always depends_on: - nginx-proxy - nginx-gen - letsencrypt-nginx-proxy-companion volumes: - /path/to/data:/dokuwiki/data # REQUIRED: Change "left" path - /path/to/conf:/dokuwiki/conf # REQUIRED: Change "left" path - /path/to/plugins:/dokuwiki/lib/plugins # REQUIRED: Change "left" path - /path/to/tpl:/dokuwiki/lib/tpl # REQUIRED: Change "left" path - /path/to/logs:/var/log # REQUIRED: Change "left" path expose: - 80 environment: - VIRTUAL_HOST=subdomain.domain.org # REQUIRED: Change to meet your needs - VIRTUAL_NETWORK=nginx-proxy - VIRTUAL_PORT=80 - VIRTUAL_PROTO=http - LETSENCRYPT_HOST=subdomain.domain.org # REQUIRED: Change to meet your needs - LETSENCRYPT_EMAIL=mail@domain.org # REQUIRED: Change to meet your needs networks: - nginx-proxy