Skip to content

Commit

Permalink
feat: add docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric-2369 committed Oct 20, 2024
1 parent 71bf667 commit 3e6881d
Show file tree
Hide file tree
Showing 16 changed files with 243 additions and 2 deletions.
9 changes: 9 additions & 0 deletions debian11-python-shadowsocksr/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
SERVER_PORT=
PASSWORD=
METHOD=
PROTOCOL=
PROTOCOL_PARAM=
OBFS=
OBFS_PARAM=
DNS_IPV6=
TZ=Asia/Shanghai
18 changes: 18 additions & 0 deletions debian11-python-shadowsocksr/compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
services:
debian11-python-shadowsocksr:
image: "eric2369/debian11-python-shadowsocksr:latest"
container_name: "debian11-python-shadowsocksr-container"
ports:
- "${SERVER_PORT}:${SERVER_PORT}"
network_mode: "host"
restart: "unless-stopped"
environment:
- "SERVER_PORT=${SERVER_PORT}"
- "PASSWORD=${PASSWORD}"
- "METHOD=${METHOD}"
- "PROTOCOL=${PROTOCOL}"
- "PROTOCOL_PARAM=${PROTOCOL_PARAM}"
- "OBFS=${OBFS}"
- "OBFS_PARAM=${OBFS_PARAM}"
- "DNS_IPV6=${DNS_IPV6}"
- "TZ=${TZ}"
2 changes: 2 additions & 0 deletions debian12-codeserver/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
DOMAIN=
PASSWORD=
26 changes: 26 additions & 0 deletions debian12-codeserver/compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
services:
debian12-codeserver:
image: "eric2369/debian12-codeserver:latest"
container_name: "debian12-codeserver-container"
labels:
- "traefik.enable=true"
- "traefik.http.services.debian12-codeserver.loadbalancer.server.port=8080"
- "traefik.http.routers.debian12-codeserver.service=debian12-codeserver"
- "traefik.http.routers.debian12-codeserver.rule=Host(`${DOMAIN}`)"
- "traefik.http.routers.debian12-codeserver.entrypoints=websecure"
- "traefik.http.routers.debian12-codeserver.tls.certresolver=leresolver"
volumes:
- "debian12-codeserver-volume:/home/coder/project"
networks:
- "traefik-network"
restart: "unless-stopped"
environment:
- "PASSWORD=${PASSWORD}"

volumes:
debian12-codeserver-volume:
name: "debian12-codeserver-volume"

networks:
traefik-network:
external: true
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ RUN set -eux; \
RUN npm install [email protected] [email protected] @salesforce/[email protected] -g \
&& npm cache clean --force

RUN echo y | sf plugins install sfdx-git-delta@5.47.0 \
RUN echo y | sf plugins install sfdx-git-delta@5.49.0 \
&& npm cache clean --force

RUN apt-get update \
Expand Down
2 changes: 1 addition & 1 deletion debian12-nodejs-typescript-salesforcecli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ RUN set -eux; \
RUN npm install [email protected] [email protected] @salesforce/[email protected] -g \
&& npm cache clean --force

RUN echo y | sf plugins install sfdx-git-delta@5.47.0 \
RUN echo y | sf plugins install sfdx-git-delta@5.49.0 \
&& npm cache clean --force

CMD ["/bin/bash"]
3 changes: 3 additions & 0 deletions debian12-serverstatusrust-client/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ADDR=
USER=
PASS=
10 changes: 10 additions & 0 deletions debian12-serverstatusrust-client/compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
services:
debian12-serverstatusrust-client:
image: "eric2369/debian12-serverstatusrust-client:latest"
container_name: "debian12-serverstatusrust-client-container"
network_mode: "host"
restart: "unless-stopped"
environment:
- "ADDR=${ADDR}"
- "USER=${USER}"
- "PASS=${PASS}"
1 change: 1 addition & 0 deletions debian12-serverstatusrust-server/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DOMAIN=
26 changes: 26 additions & 0 deletions debian12-serverstatusrust-server/compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
services:
debian12-serverstatusrust-server:
image: "eric2369/debian12-serverstatusrust-server:latest"
container_name: "debian12-serverstatusrust-server-container"
labels:
- "traefik.enable=true"
- "traefik.http.services.debian12-serverstatusrust-server.loadbalancer.server.port=8080"
- "traefik.http.routers.debian12-serverstatusrust-server.service=debian12-serverstatusrust-server"
- "traefik.http.routers.debian12-serverstatusrust-server.rule=Host(`${DOMAIN}`)"
- "traefik.http.routers.debian12-serverstatusrust-server.entrypoints=websecure"
- "traefik.http.routers.debian12-serverstatusrust-server.tls.certresolver=leresolver"
volumes:
- "debian12-serverstatusrust-server-volume:/home/serverstatus/config"
networks:
- "traefik-network"
restart: "unless-stopped"
environment:
- "RUST_LOG=error,stat_server::stats=off"

volumes:
debian12-serverstatusrust-server-volume:
name: "debian12-serverstatusrust-server-volume"

networks:
traefik-network:
external: true
2 changes: 2 additions & 0 deletions portainer-agent/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
EDGE_ID=
EDGE_KEY=
20 changes: 20 additions & 0 deletions portainer-agent/compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
services:
portainer-agent:
image: "portainer/agent:2.23.0"
container_name: "portainer-agent-container"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- "/var/lib/docker/volumes:/var/lib/docker/volumes"
- "/:/host"
- "portainer-agent-volume:/data"
network_mode: "host"
restart: "unless-stopped"
environment:
- "EDGE=1"
- "EDGE_ID=${EDGE_ID}"
- "EDGE_KEY=${EDGE_KEY}"
- "EDGE_INSECURE_POLL=1"

volumes:
portainer-agent-volume:
name: "portainer-agent-volume"
3 changes: 3 additions & 0 deletions portainer-server/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
EMAIL=
DOMAIN=
EDGE_DOMAIN=
73 changes: 73 additions & 0 deletions portainer-server/compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
version: "3.9"

services:
traefik:
image: "traefik:3.1.6"
container_name: "traefik-container"
command:
- "--entryPoints.web.address=:80"
- "--entryPoints.websecure.address=:443"
- "--providers.docker=true"
- "--providers.docker.exposedByDefault=false"
- "--providers.docker.endpoint=unix:///var/run/docker.sock"
- "--log.level=INFO"
- "--certificatesresolvers.leresolver.acme.httpchallenge=true"
- "--certificatesresolvers.leresolver.acme.httpchallenge.entrypoint=web"
- "--certificatesresolvers.leresolver.acme.email=${EMAIL}"
- "--certificatesresolvers.leresolver.acme.storage=/traefik-volume/acme.json"
labels:
- "traefik.enable=true"
- "traefik.http.routers.http-catchall.rule=hostregexp(`{host:.+}`)"
- "traefik.http.routers.http-catchall.entrypoints=web"
- "traefik.http.routers.http-catchall.middlewares=redirect-to-https"
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
- "traefik.http.middlewares.redirect-to-https.redirectscheme.permanent=true"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "traefik-volume:/traefik-volume"
ports:
- "80:80"
- "443:443"
networks:
- "traefik-network"
restart: "unless-stopped"

portainer-server:
image: "portainer/portainer-ce:2.23.0"
container_name: "portainer-server-container"
command: "-H unix:///var/run/docker.sock"
labels:
- "traefik.enable=true"
- "traefik.http.services.frontend.loadbalancer.server.port=9000"
- "traefik.http.routers.frontend.service=frontend"
- "traefik.http.routers.frontend.rule=Host(`${DOMAIN}`)"
- "traefik.http.routers.frontend.entrypoints=websecure"
- "traefik.http.routers.frontend.tls.certresolver=leresolver"

- "traefik.http.services.edge.loadbalancer.server.port=8000"
- "traefik.http.routers.edge.service=edge"
- "traefik.http.routers.edge.rule=Host(`${EDGE_DOMAIN}`)"
- "traefik.http.routers.edge.entrypoints=websecure"
- "traefik.http.routers.edge.tls.certresolver=leresolver"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- "portainer-server-volume:/data"
networks:
- "traefik-network"
restart: "unless-stopped"

volumes:
traefik-volume:
name: "traefik-volume"
portainer-server-volume:
name: "portainer-server-volume"

networks:
traefik-network:
name: "traefik-network"
driver: "bridge"
ipam:
config:
- subnet: "172.32.0.0/16"
ip_range: "172.32.1.0/24"
gateway: "172.32.0.1"
1 change: 1 addition & 0 deletions traefik/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
EMAIL=
47 changes: 47 additions & 0 deletions traefik/compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
version: "3.9"

services:
traefik:
image: "traefik:3.1.6"
container_name: "traefik-container"
command:
- "--entryPoints.web.address=:80"
- "--entryPoints.websecure.address=:443"
- "--providers.docker=true"
- "--providers.docker.exposedByDefault=false"
- "--providers.docker.endpoint=unix:///var/run/docker.sock"
- "--log.level=INFO"
- "--certificatesresolvers.leresolver.acme.httpchallenge=true"
- "--certificatesresolvers.leresolver.acme.httpchallenge.entrypoint=web"
- "--certificatesresolvers.leresolver.acme.email=${EMAIL}"
- "--certificatesresolvers.leresolver.acme.storage=/traefik-volume/acme.json"
labels:
- "traefik.enable=true"
- "traefik.http.routers.http-catchall.rule=hostregexp(`{host:.+}`)"
- "traefik.http.routers.http-catchall.entrypoints=web"
- "traefik.http.routers.http-catchall.middlewares=redirect-to-https"
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
- "traefik.http.middlewares.redirect-to-https.redirectscheme.permanent=true"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "traefik-volume:/traefik-volume"
ports:
- "80:80"
- "443:443"
networks:
- "traefik-network"
restart: "unless-stopped"

volumes:
traefik-volume:
name: "traefik-volume"

networks:
traefik-network:
name: "traefik-network"
driver: "bridge"
ipam:
config:
- subnet: "172.32.0.0/16"
ip_range: "172.32.1.0/24"
gateway: "172.32.0.1"

0 comments on commit 3e6881d

Please sign in to comment.