Skip to content

Commit

Permalink
fix: make /data a volume, fix nextcloud example (#26)
Browse files Browse the repository at this point in the history
Signed-off-by: Ingolf Becker <ingolf.becker@googlemail.com>
  • Loading branch information
watercrossing committed Nov 10, 2023
1 parent 9d26c19 commit 0e6e7e2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@ RUN go mod download
COPY . /src/
ENV SKIP_FORWARDING_TESTS=1
RUN make all test
WORKDIR /data
RUN touch /data/.build

# Deploy image
FROM tor
RUN useradd --create-home -d /data -s /bin/bash onionpipe
COPY --from=build /src/onionpipe /onionpipe
COPY --from=build --chown=1000 /data/ /data/
VOLUME [ "/data" ]
WORKDIR /data
USER 1000
USER onionpipe
ENTRYPOINT [ "/onionpipe" ]
8 changes: 2 additions & 6 deletions examples/nextcloud/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,15 @@ services:
onionpipe:
image: ghcr.io/cmars/onionpipe:main
restart: always
command: --secrets /var/lib/onionpipe/secrets.json app:80~80@nextcloud
command: --secrets /data/secrets.json app:80~80@nextcloud
volumes:
- onionpipe:/var/lib/onionpipe
- onionpipe:/data

db:
image: postgres
restart: always
volumes:
- db:/var/lib/postgresql/data
ports:
- '5432'
environment:
- POSTGRES_USER=nextcloud
- POSTGRES_PASSWORD=changeme
Expand All @@ -28,8 +26,6 @@ services:
app:
image: nextcloud
restart: always
ports:
- 8080:80
links:
- db
volumes:
Expand Down

0 comments on commit 0e6e7e2

Please sign in to comment.