Остання активність 1749651597

A getting started setup for cloudflared and docker compose.

DraxCodes's Avatar DraxCodes ревизій цього gist 1749651597. До ревизії

4 files changed, 79 insertions

cloudflared-.env(файл створено)

@@ -0,0 +1,3 @@
1 + # Your cloudflared .env file for storing your token.
2 +
3 + TUNNEL_TOKEN=PLACE_YOUR_CLOUDFLARED_TOKEN_HERE

cloudflared-docker.compose.yml(файл створено)

@@ -0,0 +1,17 @@
1 + # The docker-compose for cloudflared and hooking it to the network.
2 +
3 + services:
4 + cloudflare:
5 + image: cloudflare/cloudflared
6 + env_file:
7 + - .env
8 + command: tunnel --no-autoupdate run
9 + environment:
10 + - TUNNEL_TOKEN=${TUNNEL_TOKEN}
11 + networks:
12 + cloudflarednet:
13 + restart: unless-stopped
14 +
15 + networks:
16 + cloudflarednet:
17 + external: true

zipline-docker-compose.yml(файл створено)

@@ -0,0 +1,52 @@
1 + # This is the example service we'd be connecting to cloudflared.
2 + # Uses Zipline (https://zipline.diced.sh)
3 +
4 + services:
5 + postgresql:
6 + image: postgres:16
7 + restart: unless-stopped
8 + env_file:
9 + - .env
10 + environment:
11 + POSTGRES_USER: ${POSTGRESQL_USER:-zipline}
12 + POSTGRES_PASSWORD: ${POSTGRESQL_PASSWORD:?POSTGRESSQL_PASSWORD is required}
13 + POSTGRES_DB: ${POSTGRESQL_DB:-zipline}
14 + volumes:
15 + - pgdata:/var/lib/postgresql/data
16 + healthcheck:
17 + test: ['CMD', 'pg_isready', '-U', 'zipline']
18 + interval: 10s
19 + timeout: 5s
20 + retries: 5
21 + networks:
22 + cloudflarednet:
23 +
24 + zipline:
25 + image: ghcr.io/diced/zipline:latest
26 + container_name: zipline
27 + restart: unless-stopped
28 + env_file:
29 + - .env
30 + environment:
31 + - DATABASE_URL=postgres://${POSTGRESQL_USER:-zipline}:${POSTGRESQL_PASSWORD}@postgresql:5432/${POSTGRESQL_DB:-zipline}
32 + depends_on:
33 + postgresql:
34 + condition: service_healthy
35 + volumes:
36 + - './uploads:/zipline/uploads'
37 + - './public:/zipline/public'
38 + - './themes:/zipline/themes'
39 + healthcheck:
40 + test: ['CMD', 'wget', '-q', '--spider', 'http://0.0.0.0:3000/api/healthcheck']
41 + interval: 15s
42 + timeout: 2s
43 + retries: 2
44 + networks:
45 + cloudflarednet:
46 +
47 + volumes:
48 + pgdata:
49 +
50 + networks:
51 + cloudflarednet:
52 + external: true

zipline.env(файл створено)

@@ -0,0 +1,7 @@
1 + # the Zipline .env file for storing sensitive info
2 +
3 + POSTGRESQL_PASSWORD=Drax1234
4 + POSTGRESQL_USER=drax
5 + CORE_SECRET=12345678901234567890123456789012
6 +
7 + # DO NOT USE THESE VALUES, USE MORE SECURE VALUES AS PER: https://zipline.diced.sh/docs/get-started/docker
Новіше Пізніше