diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4c49bd7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.env diff --git a/deckard/portainer_agent.yml b/deckard/portainer_agent.yml new file mode 100644 index 0000000..76a7172 --- /dev/null +++ b/deckard/portainer_agent.yml @@ -0,0 +1,25 @@ +services: + portainer_agent: + # The official Portainer Agent image + image: portainer/agent:2.33.2 + + # The container will be named 'portainer_agent' + container_name: portainer_agent + + # Always restart the container if it stops + restart: always + + environment: + - AGENT_SECRET=${AGENT_SECRET} + + ports: + # Exposes the agent's communication port to the host + - "9001:9001" + + volumes: + # Grants access to the Docker socket + - /var/run/docker.sock:/var/run/docker.sock + # Allows management of Docker volumes + - /var/lib/docker/volumes:/var/lib/docker/volumes + # Allows browsing the host filesystem (optional but useful) + - /:/host diff --git a/portainer/.portainer-server.yml.swp b/portainer/.portainer-server.yml.swp deleted file mode 100644 index 596dea0..0000000 Binary files a/portainer/.portainer-server.yml.swp and /dev/null differ diff --git a/portainer/portainer-agent.yml b/portainer/portainer-agent.yml deleted file mode 100644 index a31c82f..0000000 --- a/portainer/portainer-agent.yml +++ /dev/null @@ -1,20 +0,0 @@ -services: - portainer_agent: - # This is the image to use - image: portainer/agent - - # This corresponds to --name portainer_agent - container_name: portainer_agent - - # This corresponds to --restart=always - restart: always - - # This corresponds to -p 9001:9001 - ports: - - "9001:9001" - - # This corresponds to the -v flags - volumes: - - /var/run/docker.sock:/var/run/docker.sock - - /var/lib/docker/volumes:/var/lib/docker/volumes - diff --git a/portainer/portainer-server.yml b/portainer/portainer-server.yml deleted file mode 100644 index 53d8561..0000000 --- a/portainer/portainer-server.yml +++ /dev/null @@ -1,27 +0,0 @@ -services: - portainer: - container_name: portainer - image: portainer/portainer-ce:lts - restart: always - # 1. Add this command to disable Portainer's TLS and use HTTP on port 9000 - command: --no-tls - volumes: - - /var/run/docker.sock:/var/run/docker.sock - - portainer_data:/data - ports: - # 2. We remove the 9443 port. Caddy will access Portainer internally. - # - 9443:9443 - - 8000:8000 # Keep if you use Edge Agents - - # 3. Connect this container to the shared caddynet network - networks: - - caddynet - -volumes: - portainer_data: - name: portainer_data - -# 4. Define caddynet as an existing, external network -networks: - caddynet: - external: true