Adding example docker compose file

This commit is contained in:
Glahera Matebi 2024-12-18 10:36:13 +07:00
parent 2a602e40f3
commit bd80ed38fb
2 changed files with 22 additions and 1 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
*/.env
.env

21
compose-example.yml Normal file
View File

@ -0,0 +1,21 @@
services:
ts:
image: 'tailscale/tailscale:latest'
hostname: $APPNAME
restart: 'always'
environment:
- "TS_AUTHKEY=$TS_AUTHKEY"
- "TS_EXTRA_ARGS=--advertise-tags=tag:container"
- "TS_USERSPACE=true"
- "TS_STATE_DIR=/var/lib/tailscale"
volumes:
- 'ts_state:/var/lib/tailscale'
svr:
build:
context: .
depends_on:
- 'ts'
restart: 'always'
network_mode: 'service:ts'
volumes:
ts_state: