Skip to content

Commit

Permalink
automatically restart containers unless stopped
Browse files Browse the repository at this point in the history
  • Loading branch information
jbowdre committed Jan 1, 2024
1 parent f316165 commit dc6939d
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Tailscale Serve in a Docker Compose Sidecar"
date: 2023-12-30
# lastmod: 2023-12-28
lastmod: 2024-01-01
description: "Using Docker Compose to deploy containerized applications and make them available via Tailscale Serve and Tailscale Funnel"
featured: false
toc: true
Expand Down Expand Up @@ -120,6 +120,7 @@ There's also a [sample `docker-compose.yml`](https://github.com/jbowdre/tailscal
services:
tailscale:
image: ghcr.io/jbowdre/tailscale-docker:latest
restart: unless-stopped
container_name: tailscale
environment:
TS_AUTHKEY: ${TS_AUTHKEY:?err} # from https://login.tailscale.com/admin/settings/authkeys
Expand All @@ -133,6 +134,7 @@ services:
- ./ts_data:/var/lib/tailscale/ # the mount point should match TS_STATE_DIR
myservice:
image: nginxdemos/hello
restart: unless-stopped
network_mode: "service:tailscale" # use the tailscale network service's network
```
Expand Down Expand Up @@ -211,6 +213,7 @@ And I can add the corresponding `docker-compose.yml` to go with it:
services:
tailscale: # [tl! focus:start]
image: ghcr.io/jbowdre/tailscale-docker:latest
restart: unless-stopped
container_name: cyberchef-tailscale
environment:
TS_AUTHKEY: ${TS_AUTHKEY:?err}
Expand Down Expand Up @@ -286,6 +289,7 @@ I adapted the [example `docker-compose.yml`](https://miniflux.app/docs/dacker.ht
services:
tailscale: # [tl! focus:start]
image: ghcr.io/jbowdre/tailscale-docker:latest
restart: unless-stopped
container_name: miniflux-tailscale
environment:
TS_AUTHKEY: ${TS_AUTHKEY:?err}
Expand All @@ -299,6 +303,7 @@ services:
- ./ts_data:/var/lib/tailscale/ # [tl! focus:end]
miniflux:
image: miniflux/miniflux:latest
restart: unless-stopped
container_name: miniflux
depends_on:
db:
Expand All @@ -312,6 +317,7 @@ services:
network_mode: "service:tailscale" # [tl! focus]
db:
image: postgres:15
restart: unless-stopped
container_name: miniflux-db
environment:
- POSTGRES_USER=${DB_USER}
Expand Down

0 comments on commit dc6939d

Please sign in to comment.