Merge pull request 'Route 15-puzzle outbound through AmneziaWG sidecar' (#2) from add-gitea-ci into master
Reviewed-on: #2
This commit was merged in pull request #2.
This commit is contained in:
@@ -56,6 +56,7 @@ jobs:
|
|||||||
- name: Build image and (re)deploy container
|
- name: Build image and (re)deploy container
|
||||||
working-directory: deploy
|
working-directory: deploy
|
||||||
env:
|
env:
|
||||||
|
AWG_CONF: ${{ secrets.AWG_CONF }}
|
||||||
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
|
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
|
||||||
ACCESS_CODE: ${{ secrets.ACCESS_CODE }}
|
ACCESS_CODE: ${{ secrets.ACCESS_CODE }}
|
||||||
PROJECT_LINK: ${{ vars.PROJECT_LINK }}
|
PROJECT_LINK: ${{ vars.PROJECT_LINK }}
|
||||||
|
|||||||
@@ -3,9 +3,33 @@
|
|||||||
# values are interpolated from Gitea Actions secrets/variables exported by the
|
# values are interpolated from Gitea Actions secrets/variables exported by the
|
||||||
# deploy job. Joins the external `edge` network so the host reverse proxy can
|
# deploy job. Joins the external `edge` network so the host reverse proxy can
|
||||||
# route to `15-puzzle:8080`.
|
# route to `15-puzzle:8080`.
|
||||||
|
#
|
||||||
|
# Networking:
|
||||||
|
# - The `vpn` sidecar (developer/amneziawg-sidecar) holds an AmneziaWG
|
||||||
|
# tunnel and provides the netns shared by `app`. `app` joins it via
|
||||||
|
# network_mode: "service:vpn"; consequently `app` has no own network
|
||||||
|
# config — addresses, DNS and the default route belong to `vpn`.
|
||||||
|
# - `vpn` is the one attached to the `edge` network, with the alias
|
||||||
|
# `15-puzzle`, so the existing caddy → 15-puzzle:8080 reverse proxy
|
||||||
|
# continues to work without any caddy-side change. Port 8080 is
|
||||||
|
# reachable on the alias because `app` listens on it inside the
|
||||||
|
# shared netns.
|
||||||
|
|
||||||
name: 15-puzzle
|
name: 15-puzzle
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
vpn:
|
||||||
|
container_name: 15-puzzle-vpn
|
||||||
|
image: docker.iliadenisov.ru/developer/amneziawg-sidecar:latest
|
||||||
|
restart: unless-stopped
|
||||||
|
privileged: true
|
||||||
|
environment:
|
||||||
|
AWG_CONF: ${AWG_CONF:?set AWG_CONF}
|
||||||
|
networks:
|
||||||
|
edge:
|
||||||
|
aliases:
|
||||||
|
- 15-puzzle
|
||||||
|
|
||||||
app:
|
app:
|
||||||
container_name: 15-puzzle
|
container_name: 15-puzzle
|
||||||
image: 15-puzzle:latest
|
image: 15-puzzle:latest
|
||||||
@@ -13,6 +37,9 @@ services:
|
|||||||
context: ..
|
context: ..
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
depends_on:
|
||||||
|
- vpn
|
||||||
|
network_mode: "service:vpn"
|
||||||
environment:
|
environment:
|
||||||
BOT_TOKEN: ${BOT_TOKEN:?set BOT_TOKEN}
|
BOT_TOKEN: ${BOT_TOKEN:?set BOT_TOKEN}
|
||||||
ACCESS_CODE: ${ACCESS_CODE:?set ACCESS_CODE}
|
ACCESS_CODE: ${ACCESS_CODE:?set ACCESS_CODE}
|
||||||
@@ -22,8 +49,6 @@ services:
|
|||||||
CONTEXT_ROOT: ${CONTEXT_ROOT:-/}
|
CONTEXT_ROOT: ${CONTEXT_ROOT:-/}
|
||||||
volumes:
|
volumes:
|
||||||
- data:/data
|
- data:/data
|
||||||
networks:
|
|
||||||
- edge
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
data:
|
data:
|
||||||
@@ -31,4 +56,4 @@ volumes:
|
|||||||
|
|
||||||
networks:
|
networks:
|
||||||
edge:
|
edge:
|
||||||
external: true
|
external: true
|
||||||
Reference in New Issue
Block a user