Skip to content

Commit 734e5d8

Browse files
committed
doc: update docker compose exemple
1 parent 9b959ce commit 734e5d8

2 files changed

Lines changed: 20 additions & 15 deletions

File tree

docker-compose.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,19 @@ services:
22
moley:
33
image: ghcr.io/stupside/moley:latest
44
container_name: moley
5-
working_dir: /home/nonroot
5+
environment:
6+
MOLEY_CLOUDFLARE__TOKEN: "<your-cloudflare-api-token>"
7+
MOLEY_TUNNEL_TUNNEL__NAME: "moley-test"
8+
MOLEY_TUNNEL_TUNNEL__PERSISTENT: "false"
9+
MOLEY_TUNNEL_INGRESS__ZONE: "xonery.dev"
10+
MOLEY_TUNNEL_INGRESS__MODE: "subdomain"
11+
MOLEY_TUNNEL_INGRESS__APPS__0__TARGET__HOSTNAME: "host.docker.internal"
12+
MOLEY_TUNNEL_INGRESS__APPS__0__TARGET__PORT: "3000"
13+
MOLEY_TUNNEL_INGRESS__APPS__0__TARGET__PROTOCOL: "http"
14+
MOLEY_TUNNEL_INGRESS__APPS__0__EXPOSE__SUBDOMAIN: "test"
615
volumes:
716
# Configuration file for moley
8-
- ./moley.yml:/home/nonroot/moley.yml:ro
17+
# - ./moley.yml:/root/moley.yml:ro
918
# Persisted moley state (API token, lock file, tunnel configs)
10-
- ./data/.moley:/home/nonroot/.moley
19+
- ./data/.moley:/root/.moley
1120
command: ["--help"]

docs/docs/guides/docker.mdx

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,11 @@ services:
2828
moley:
2929
image: ghcr.io/stupside/moley:latest
3030
container_name: moley
31-
working_dir: /home/nonroot
3231
volumes:
3332
# Configuration file for moley
34-
- ./moley.yml:/home/nonroot/moley.yml:ro
33+
- ./moley.yml:/root/moley.yml:ro
3534
# Persisted moley state (API token, lock file, tunnel configs)
36-
- ./data/.moley:/home/nonroot/.moley
35+
- ./data/.moley:/root/.moley
3736
command: ["--help"]
3837
```
3938
@@ -108,10 +107,9 @@ services:
108107
MOLEY_CLOUDFLARE__TOKEN: "${CF_TOKEN}"
109108
MOLEY_TUNNEL_INGRESS__ZONE: "example.com"
110109
MOLEY_TUNNEL_INGRESS__APPS__0__TARGET__PORT: "3000"
111-
working_dir: /home/nonroot
112110
volumes:
113-
- ./moley.yml:/home/nonroot/moley.yml:ro
114-
- ./data/.moley:/home/nonroot/.moley
111+
- ./moley.yml:/root/moley.yml:ro
112+
- ./data/.moley:/root/.moley
115113
```
116114
117115
See [Configuration → Environment variables](/docs/configuration/#environment-variables) for the full convention.
@@ -144,10 +142,9 @@ services:
144142
moley:
145143
image: ghcr.io/stupside/moley:latest
146144
network_mode: host
147-
working_dir: /home/nonroot
148145
volumes:
149-
- ./moley.yml:/home/nonroot/moley.yml:ro
150-
- ./data/.moley:/home/nonroot/.moley
146+
- ./moley.yml:/root/moley.yml:ro
147+
- ./data/.moley:/root/.moley
151148
```
152149

153150
Then `hostname: localhost` in `moley.yml` works as expected.
@@ -170,10 +167,9 @@ services:
170167
image: ghcr.io/stupside/moley:latest
171168
depends_on:
172169
- web
173-
working_dir: /home/nonroot
174170
volumes:
175-
- ./moley.yml:/home/nonroot/moley.yml:ro
176-
- ./data/.moley:/home/nonroot/.moley
171+
- ./moley.yml:/root/moley.yml:ro
172+
- ./data/.moley:/root/.moley
177173
command: ["tunnel", "run"]
178174
```
179175

0 commit comments

Comments
 (0)