Skip to content
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
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ services:
context: .
dockerfile: docker/web.Dockerfile
ports:
- "${WILLOW_WEB_PORT:-8080}:80"
- "${WILLOW_WEB_PORT:-8080}:8080"
depends_on:
- relay
restart: unless-stopped
Expand Down
6 changes: 5 additions & 1 deletion docker/relay.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ COPY . .
RUN cargo build --release -p willow-relay

FROM rust:slim
RUN useradd -r -u 10001 -m -d /home/willow willow \
&& mkdir -p /etc/willow /shared \
&& chown -R willow:willow /etc/willow /shared
COPY --from=builder /build/target/release/willow-relay /usr/local/bin/willow-relay
COPY docker/relay-entrypoint.sh /entrypoint.sh
COPY --chown=willow:willow docker/relay-entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

USER willow
EXPOSE 9090 9091
ENTRYPOINT ["/entrypoint.sh"]
6 changes: 5 additions & 1 deletion docker/replay.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ COPY . .
RUN cargo build --release -p willow-replay

FROM rust:slim
RUN useradd -r -u 10001 -m -d /home/willow willow \
&& mkdir -p /etc/willow \
&& chown -R willow:willow /etc/willow
COPY --from=builder /build/target/release/willow-replay /usr/local/bin/willow-replay
COPY docker/replay-entrypoint.sh /entrypoint.sh
COPY --chown=willow:willow docker/replay-entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

USER willow
ENTRYPOINT ["/entrypoint.sh"]
6 changes: 5 additions & 1 deletion docker/storage.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ COPY . .
RUN cargo build --release -p willow-storage

FROM rust:slim
RUN useradd -r -u 10001 -m -d /home/willow willow \
&& mkdir -p /etc/willow /var/lib/willow \
&& chown -R willow:willow /etc/willow /var/lib/willow
COPY --from=builder /build/target/release/willow-storage /usr/local/bin/willow-storage
COPY docker/storage-entrypoint.sh /entrypoint.sh
COPY --chown=willow:willow docker/storage-entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

USER willow
ENTRYPOINT ["/entrypoint.sh"]
8 changes: 5 additions & 3 deletions docker/web.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ WORKDIR /build
COPY . .
RUN cd crates/web && trunk build --release

FROM nginx:alpine
COPY --from=builder /build/crates/web/dist/ /usr/share/nginx/html/
FROM nginxinc/nginx-unprivileged:alpine
COPY --from=builder --chown=nginx:nginx /build/crates/web/dist/ /usr/share/nginx/html/
RUN chmod 644 /usr/share/nginx/html/*
EXPOSE 80

USER nginx
EXPOSE 8080