Skip to content

Commit

Permalink
Simplify permissions to solve db folder issue
Browse files Browse the repository at this point in the history
  • Loading branch information
dcadenas committed Jul 23, 2024
1 parent 5010a5f commit fae7350
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,15 @@ RUN apt-get update && \
EXPOSE 7777

ENV TZ=Etc/UTC \
APP_USER=appuser \
RUST_LOG=info,nostr_rs_relay=info \
APP_DATA=${APP_DATA}

RUN groupadd $APP_USER && \
useradd -g $APP_USER $APP_USER && \
mkdir -p ${APP} && \
mkdir -p ${APP_DATA} && \
chown -R $APP_USER:$APP_USER ${APP} ${APP_DATA}
RUN mkdir -p ${APP} && \
mkdir -p ${APP_DATA}

COPY --from=builder /nostr-rs-relay/target/release/nostr-rs-relay ${APP}/nostr-rs-relay
COPY --from=builder /usr/src/app/config.toml ${APP}/config.toml

RUN chown $APP_USER:$APP_USER ${APP}/config.toml

USER $APP_USER
WORKDIR ${APP}

CMD ./nostr-rs-relay --db ${APP_DATA}

CMD ./nostr-rs-relay --db ${APP_DATA}

0 comments on commit fae7350

Please sign in to comment.