-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-with-tailscale.yml
87 lines (80 loc) · 1.98 KB
/
docker-compose-with-tailscale.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
version: '3.8'
services:
bb_meilisearch:
image: getmeili/meilisearch:v1.9
env_file: .env
# networks:
# - bb-network
restart: unless-stopped
depends_on:
bb_setup:
condition: service_completed_successfully
ports:
- '7700:7700'
healthcheck:
test: wget --no-verbose --spider http://localhost:7700/health
interval: 10s
retries: 5
start_period: 30s
timeout: 10s
bb_mongodb:
image: mongo:7-jammy
ports:
- '27017:27017'
depends_on:
bb_meilisearch:
condition: service_healthy
volumes:
- mongodata:/data/db
- ./:/app
# networks:
# - bb-network
env_file: .env
restart: unless-stopped
healthcheck:
# test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet
test: cd /app && scripts/export.sh
interval: 10m
retries: 5
start_period: 30s
timeout: 10s
bb_tailscale:
image: tailscale/tailscale:latest
# container_name: bb_tailscale
# hostname must match the name of your auth key
hostname: <YOUR AUTH KEY NAME>
environment:
- TS_AUTHKEY=<YOUR TAILSCALE AUTH KEY>
- TS_STATE_DIR=/var/lib/tailscale
- TS_USERSPACE=false
- TS_SERVE_CONFIG=/app/docker/tailscale/config.json
volumes:
- ${PWD}/bb_tailscale/state:/var/lib/tailscale
- /dev/net/tun:/dev/net/tun
- ./:/app
cap_add:
- net_admin
- sys_module
restart: unless-stopped
bb_setup:
image: golang:1.22.5
volumes:
- ./:/app
command: ["/app/docker/handle_required_setup.sh"]
bb_rails:
image: ruby:3.3.4
environment:
- BUNDLE_PATH=/app/gems
network_mode: service:bb_tailscale
depends_on:
bb_mongodb:
condition: service_healthy
bb_meilisearch:
condition: service_healthy
bb_tailscale:
condition: service_started
volumes:
- ./:/app
command: ["/app/docker/serve"]
volumes:
mongodata: