Skip to content

Instantly share code, notes, and snippets.

@nikhiljohn10
Last active August 2, 2022 22:14
Show Gist options
  • Select an option

  • Save nikhiljohn10/592b52169ed4c36dde080dcb3cd12dfe to your computer and use it in GitHub Desktop.

Select an option

Save nikhiljohn10/592b52169ed4c36dde080dcb3cd12dfe to your computer and use it in GitHub Desktop.
Docker Compose for Docker on VPS
version: "3.9"
services:
proxy:
image: "traefik:latest"
container_name: proxy
restart: always
depends_on:
- donet
ports:
- "443:443"
volumes:
- /home/debian/certs:/certs:ro
- /home/debian/traefik/traefik.yml:/etc/traefik/traefik.yml
- /var/run/docker.sock:/var/run/docker.sock:ro
labels:
traefik.enable: true
traefik.http.routers.proxy.rule: Host(`proxy.infamousimps.xyz`)
traefik.http.routers.proxy.service: api@internal
traefik.http.routers.proxy.tls: true
networks:
- donet
portainer:
image: portainer/portainer-ce:latest
container_name: portainer
restart: always
depends_on:
- proxy
- portainer_data
volumes:
- portainer_data:/data
- /var/run/docker.sock:/var/run/docker.sock
security_opt:
- no-new-privileges:true
labels:
traefik.enable: true
traefik.http.routers.portainer.rule: Host(`docker.infamousimps.xyz`)
traefik.http.routers.portainer.tls: true
traefik.http.services.http-port.loadbalancer.server.port: 9000
networks:
- donet
test:
image: traefik/whoami
container_name: test
restart: always
depends_on:
- dash
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
labels:
traefik.enable: true
traefik.http.routers.test.rule: Host(`test.infamousimps.xyz`)
traefik.http.routers.test.tls: true
networks:
- donet
dash:
image: lscr.io/linuxserver/heimdall:latest
container_name: dash
restart: always
depends_on:
- portainer
- dashboard_config
environment:
- PUID=1000
- PGID=1000
- TZ=Asia/Kolkata
volumes:
- dashboard_config:/config
- /var/run/docker.sock:/var/run/docker.sock:ro
labels:
traefik.enable: true
traefik.http.routers.dash.rule: Host(`dash.infamousimps.xyz`)
traefik.http.routers.dash.tls: true
networks:
- donet
volumes:
portainer_data:
dashboard_config:
networks:
donet:
driver: bridge
name: donet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment