forked from fly-apps/tailscale-router
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
re-order Dockerfile; tweak for internal use
- Loading branch information
Showing
6 changed files
with
57 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# flyctl launch added from .gitignore | ||
**/.idea | ||
fly.toml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# See https://fly.io/docs/app-guides/continuous-deployment-with-github-actions/ | ||
|
||
name: Fly Deploy | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
deploy: | ||
name: Deploy app | ||
runs-on: ubuntu-latest | ||
concurrency: deploy-group # optional: ensure only one action runs at a time | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: superfly/flyctl-actions/setup-flyctl@master | ||
- run: flyctl deploy --remote-only | ||
env: | ||
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,32 @@ | ||
# Builder | ||
FROM golang:1.19-alpine as builder | ||
|
||
WORKDIR /app | ||
|
||
COPY . ./ | ||
|
||
RUN go mod download | ||
RUN go build | ||
|
||
|
||
# Release | ||
FROM alpine:latest | ||
RUN apk update && apk add ca-certificates iptables ip6tables bash bind-tools jq && rm -rf /var/cache/apk/* | ||
|
||
ENV TSFILE=tailscale_1.70.0_amd64.tgz | ||
ENV DNSPROXYFILE=dnsproxy-linux-amd64-v0.72.1.tar.gz | ||
ENV DNSPROXYVERSION=v0.72.1 | ||
|
||
WORKDIR /app | ||
COPY . ./ | ||
ENV TSFILE=tailscale_1.30.2_amd64.tgz | ||
ENV DNSPROXYFILE=dnsproxy-linux-amd64-v0.45.2.tar.gz | ||
ENV DNSPROXYVERSION=v0.45.2 | ||
|
||
RUN apk update && apk add ca-certificates iptables ip6tables bash bind-tools jq && rm -rf /var/cache/apk/* | ||
RUN wget https://pkgs.tailscale.com/stable/${TSFILE} && tar xzf ${TSFILE} --strip-components=1 | ||
RUN wget https://github.com/AdguardTeam/dnsproxy/releases/download/${DNSPROXYVERSION}/${DNSPROXYFILE} && tar xzf ${DNSPROXYFILE} --strip-components=1 | ||
|
||
COPY --from=builder /app/tailscale-router /app/tailscale-router | ||
COPY . ./ | ||
|
||
# Copy and run tailscale init script, default nginx config | ||
COPY docker-entrypoint.sh /usr/local/bin/ | ||
RUN chmod +x /usr/local/bin/docker-entrypoint.sh | ||
RUN mkdir -p /var/run/tailscale /var/cache/tailscale /var/lib/tailscale | ||
|
||
CMD ["/app/start.sh"] | ||
CMD ["/usr/local/bin/docker-entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,5 +13,4 @@ else | |
exit 1 | ||
fi | ||
|
||
|
||
tail -f /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# fly.toml app configuration file generated for bcit-ltc-subnet-router-crimson-sun-1032 on 2024-08-08T12:50:41-07:00 | ||
# | ||
# See https://fly.io/docs/reference/configuration/ for information about how to use this file. | ||
# | ||
|
||
app = 'bcit-ltc-subnet-router' | ||
primary_region = 'yyz' | ||
|
||
[env] | ||
TS_HOSTNAME = 'bcit-ltc-subnet-router' | ||
|
||
[build] | ||
|
||
[[vm]] | ||
size = 'shared-cpu-1x' | ||
|
||
[deploy] | ||
# release_command = " tailscale down" | ||
strategy = "canary" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters