Skip to content

Commit 4cccf3f

Browse files
committed
add tunnel service
1 parent 5363c7d commit 4cccf3f

3 files changed

Lines changed: 26 additions & 1 deletion

File tree

.env.example

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,8 @@ MICROSOFT_REDIRECT_URL=http://localhost:8080/v1/auth/microsoft/callback
3737
# ENVIRONMENT
3838
# =============================================================================
3939
ENV=development
40+
41+
# =============================================================================
42+
# CLOUDFLARE
43+
# =============================================================================
44+
TUNNEL_TOKEN=

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,9 @@ docker run -d `
180180
> **Note**: `host.docker.internal` allows the container to access your host machine's localhost (e.g., if running Postgres locally). On Linux, you may need `--add-host=host.docker.internal:host-gateway`.
181181
182182
### Running with Docker Compose (Full Stack)
183-
To run the full stack (API + Postgres) on a separate machine, create a `docker-compose.yml` file:
183+
To run the full stack (API + Postgres + Cloudflare Tunnel) on a separate machine, create a `docker-compose.yml` file.
184+
185+
> **Note**: You will need a Cloudflare Tunnel Token. Add `TUNNEL_TOKEN=your_token` to your environment variables or `.env` file.
184186
185187
```yaml
186188
version: "3.9"
@@ -215,6 +217,15 @@ services:
215217
db:
216218
condition: service_healthy
217219

220+
tunnel:
221+
image: cloudflare/cloudflared:latest
222+
restart: unless-stopped
223+
command: tunnel run
224+
environment:
225+
- TUNNEL_TOKEN=${TUNNEL_TOKEN}
226+
depends_on:
227+
- api
228+
218229
volumes:
219230
pgdata:
220231
```

docker-compose.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,14 @@ services:
3232
db:
3333
condition: service_healthy
3434

35+
tunnel:
36+
image: cloudflare/cloudflared:latest
37+
restart: unless-stopped
38+
command: tunnel run
39+
environment:
40+
- TUNNEL_TOKEN=${TUNNEL_TOKEN}
41+
depends_on:
42+
- api
43+
3544
volumes:
3645
pgdata:

0 commit comments

Comments
 (0)