diff --git a/.gitignore b/.gitignore index 9028699..acd7693 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /certs/*.key /certs/*.crt +/hide/** diff --git a/docker-compose.yml b/docker-compose.yml index 11f72f9..00afc7e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,11 +1,35 @@ version: "3" services: + portainer: + image: portainer/portainer-ce:2.1.1 + container_name: portainer + depends_on: + - traefik + command: -H unix:///var/run/docker.sock + ports: + - "9000:9000" + - "8000:8000" + networks: + - devops + labels: + - traefik.enable=true + - traefik.http.routers.portainer.entrypoints=http,https + - traefik.http.routers.portainer.rule=Host(`portainer.docker.localhost`) + - traefik.http.routers.portainer.tls=true + - traefik.http.services.portainer.loadbalancer.server.port=9000 + volumes: + - /var/run/docker.sock:/var/run/docker.sock + - portainer-data:/data + traefik: restart: always image: traefik:2.4.5 ports: - "80:80" - "443:443" + networks: + - devops + - inbound volumes: - /var/run/docker.sock:/var/run/docker.sock:ro - ./certs:/certs:ro @@ -19,5 +43,10 @@ services: - traefik.http.routers.mydevproxy.service=api@internal networks: - default: - name: inbound \ No newline at end of file + devops: + name: devops + inbound: + name: inbound + +volumes: + portainer-data: \ No newline at end of file