mirror of
https://github.com/mikedilger/chorus.git
synced 2026-05-03 06:51:42 +00:00
Update docker setup:
* Use docker-compose * Make it work with podman too * Run as root inside the container, no need for chorus user
This commit is contained in:
parent
ec57b5746c
commit
0ff9bc564f
1
docker/.env
Normal file
1
docker/.env
Normal file
@ -0,0 +1 @@
|
||||
PODMAN_USERNS=keep-id
|
||||
1
docker/.gitignore
vendored
1
docker/.gitignore
vendored
@ -1 +0,0 @@
|
||||
/chorus.toml
|
||||
@ -13,11 +13,9 @@ FROM alpine:latest
|
||||
# RUN apk add --no-cache curl gcc musl-dev openssl-dev pkgconfig git make cmake
|
||||
|
||||
# Setup chorus user and directories
|
||||
RUN adduser --system --home /opt/chorus --shell /bin/sh chorus && \
|
||||
mkdir -p /opt/chorus/etc /opt/chorus/src/chorus /opt/chorus/var /opt/chorus/sbin /opt/chorus/lib && \
|
||||
RUN mkdir -p /opt/chorus/etc /opt/chorus/src/chorus /opt/chorus/var /opt/chorus/sbin /opt/chorus/lib && \
|
||||
mkdir -p /opt/chorus/var/chorus /opt/chorus/var/www && \
|
||||
mkdir -p /opt/chorus/lib/systemd/system && \
|
||||
chown -R chorus /opt/chorus
|
||||
mkdir -p /opt/chorus/lib/systemd/system
|
||||
|
||||
COPY --from=builder /root/chorus/target/release/chorus /opt/chorus/sbin/chorus
|
||||
COPY --from=builder /root/chorus/target/release/chorus_cmd /opt/chorus/sbin/chorus_cmd
|
||||
@ -26,16 +24,12 @@ COPY --from=builder /root/chorus/target/release/chorus_dump /opt/chorus/sbin/cho
|
||||
COPY --from=builder /root/chorus/target/release/chorus_dump_approvals /opt/chorus/sbin/chorus_dump_approvals
|
||||
COPY --from=builder /root/chorus/target/release/chorus_moderate /opt/chorus/sbin/chorus_moderate
|
||||
|
||||
RUN chown -R chorus /opt/chorus/sbin && chmod 0700 /opt/chorus/sbin/*
|
||||
|
||||
COPY chorus.toml /opt/chorus/etc/chorus.toml
|
||||
RUN chown chorus /opt/chorus/etc/chorus.toml
|
||||
RUN chmod 0700 /opt/chorus/sbin/*
|
||||
|
||||
VOLUME /opt/chorus/etc
|
||||
VOLUME /opt/chorus/var
|
||||
|
||||
WORKDIR /opt/chorus
|
||||
USER chorus
|
||||
ENV RUST_BACKTRACE=1
|
||||
ENV RUST_LOG=info
|
||||
ENTRYPOINT ["/opt/chorus/sbin/chorus", "/opt/chorus/etc/chorus.toml"]
|
||||
|
||||
12
docker/docker-compose.yml
Normal file
12
docker/docker-compose.yml
Normal file
@ -0,0 +1,12 @@
|
||||
services:
|
||||
chorus:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: chorus
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./etc:/opt/chorus/etc
|
||||
- ./var:/opt/chorus/var
|
||||
ports:
|
||||
- 443:1444
|
||||
1
docker/etc/.gitignore
vendored
Normal file
1
docker/etc/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/chorus.toml
|
||||
1
docker/var/.gitignore
vendored
Normal file
1
docker/var/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user