Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make /data a volume, fix nextcloud example #26

Merged
merged 1 commit into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading