Fix Telebit container startup
This commit is contained in:
@@ -18,5 +18,3 @@ SECRET=change-me-to-a-long-random-secret
|
||||
|
||||
# Internal postgres password.
|
||||
POSTGRES_PASSWORD=change-me-postgres-password
|
||||
|
||||
VERBOSE=true
|
||||
|
||||
@@ -14,6 +14,7 @@ RUN CGO_ENABLED=0 go build -mod=vendor -ldflags="-s -w" -o /out/telebit-mgmt ./c
|
||||
FROM alpine:3.20
|
||||
|
||||
RUN apk add --no-cache ca-certificates
|
||||
RUN printf '68f8f2b8d1c04e3d9343b0c84b69a3a1\n' > /etc/machine-id
|
||||
|
||||
COPY --from=builder /out/telebit-relay /usr/local/bin/telebit-relay
|
||||
COPY --from=builder /out/telebit-mgmt /usr/local/bin/telebit-mgmt
|
||||
|
||||
@@ -6,18 +6,22 @@ services:
|
||||
TELEBIT_REF: ${TELEBIT_REF:-master}
|
||||
image: localhost/telebit-go:local
|
||||
pull_policy: build
|
||||
command: telebit-relay
|
||||
command:
|
||||
- telebit-relay
|
||||
- --secret
|
||||
- ${SECRET:?set SECRET in .env}
|
||||
- --api-hostname
|
||||
- ${TUNNEL_DOMAIN:?set TUNNEL_DOMAIN in .env}
|
||||
- --listen
|
||||
- :8085
|
||||
- --auth-url
|
||||
- http://mgmt:6468/api
|
||||
- --acme-relay-url
|
||||
- http://mgmt:6468/api/acme-relay
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
mgmt:
|
||||
condition: service_started
|
||||
environment:
|
||||
SECRET: ${SECRET:?set SECRET in .env}
|
||||
API_HOSTNAME: ${TUNNEL_DOMAIN:?set TUNNEL_DOMAIN in .env}
|
||||
LISTEN: :8085
|
||||
AUTH_URL: http://mgmt:6468/api
|
||||
ACME_RELAY_URL: http://mgmt:6468/api/acme-relay
|
||||
VERBOSE: ${VERBOSE:-true}
|
||||
ports:
|
||||
- "${TELEBIT_PORT:-8085}:8085"
|
||||
volumes:
|
||||
@@ -26,17 +30,22 @@ services:
|
||||
mgmt:
|
||||
image: localhost/telebit-go:local
|
||||
pull_policy: never
|
||||
command: telebit-mgmt
|
||||
command:
|
||||
- telebit-mgmt
|
||||
- --secret
|
||||
- ${SECRET:?set SECRET in .env}
|
||||
- --domain
|
||||
- ${DOMAIN:?set DOMAIN in .env}
|
||||
- --tunnel-domain
|
||||
- ${TUNNEL_DOMAIN:?set TUNNEL_DOMAIN in .env}
|
||||
- --db-url
|
||||
- postgres://postgres:${POSTGRES_PASSWORD:?set POSTGRES_PASSWORD in .env}@postgres:5432/postgres?sslmode=disable
|
||||
- --listen
|
||||
- 0.0.0.0:6468
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
SECRET: ${SECRET:?set SECRET in .env}
|
||||
DOMAIN: ${DOMAIN:?set DOMAIN in .env}
|
||||
TUNNEL_DOMAIN: ${TUNNEL_DOMAIN:?set TUNNEL_DOMAIN in .env}
|
||||
DB_URL: postgres://postgres:${POSTGRES_PASSWORD:?set POSTGRES_PASSWORD in .env}@postgres:5432/postgres?sslmode=disable
|
||||
LISTEN: 0.0.0.0:6468
|
||||
ports:
|
||||
- "127.0.0.1:${MGMT_PORT:-6468}:6468"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user