| 1 | FROM alpine:3.22 |
| 2 | |
| 3 | ARG TARGETARCH |
| 4 | |
| 5 | ENV FLAVOUR=${TARGETARCH}-musl |
| 6 | |
| 7 | ENV GROUP=akkoma |
| 8 | ENV USER=akkoma |
| 9 | |
| 10 | ENV MIX_ENV=prod |
| 11 | |
| 12 | RUN awk 'NR==2' /etc/apk/repositories | sed 's/main/community/' | tee -a /etc/apk/repositories |
| 13 | |
| 14 | RUN apk update |
| 15 | RUN apk add curl unzip ncurses file-dev |
| 16 | RUN apk add imagemagick ffmpeg exiftool |
| 17 | |
| 18 | RUN addgroup -S $GROUP && adduser -S $USER -G $GROUP |
| 19 | |
| 20 | RUN mkdir /etc/akkoma |
| 21 | |
| 22 | COPY --chown=$USER:$GROUP --chmod=600 config.exs /etc/akkoma/ |
| 23 | |
| 24 | RUN mkdir -p /opt/akkoma |
| 25 | RUN chown $USER /opt/akkoma |
| 26 | |
| 27 | USER $USER |
| 28 | |
| 29 | WORKDIR /opt/akkoma |
| 30 | |
| 31 | RUN curl https://akkoma-updates.s3-website.fr-par.scw.cloud/stable/akkoma-$FLAVOUR.zip -o /tmp/akkoma.zip && \ |
| 32 | unzip /tmp/akkoma.zip -d /tmp && \ |
| 33 | mv /tmp/release/* /opt/akkoma/ |
| 34 | |
| 35 | COPY --chown=$USER:$GROUP start.sh /opt/akkoma |
| 36 | |
| 37 | CMD ["/opt/akkoma/start.sh"] |
db / Akkoma Docker
Last active 3 months ago
Revision 0305d3736e0b09d8586d1d8af8f6ee4a5b99e20a
| 1 | services: |
| 2 | db: |
| 3 | image: postgres:16-alpine |
| 4 | shm_size: 4gb |
| 5 | restart: unless-stopped |
| 6 | environment: { |
| 7 | # This might seem insecure but is usually not a problem. |
| 8 | # You should leave this at the "akkoma" default. |
| 9 | # The DB is only reachable by containers in the same docker network, |
| 10 | # and is not exposed to the open internet. |
| 11 | # |
| 12 | # If you do change this, remember to update "config.exs". |
| 13 | POSTGRES_DB: akkoma, |
| 14 | POSTGRES_USER: akkoma, |
| 15 | POSTGRES_PASSWORD: akkoma, |
| 16 | } |
| 17 | volumes: |
| 18 | - ./data:/var/lib/postgresql/data/ |
| 19 | |
| 20 | akkoma: |
| 21 | image: akkoma:latest |
| 22 | build: . |
| 23 | restart: unless-stopped |
| 24 | links: |
| 25 | - db |
| 26 | ports: [ |
| 27 | # Uncomment/Change port mappings below as needed. |
| 28 | # The left side is your host machine, the right one is the akkoma container. |
| 29 | # You can prefix the left side with an ip. |
| 30 | |
| 31 | # Webserver (for reverse-proxies outside of docker) |
| 32 | # If you use a dockerized proxy, you can leave this commented |
| 33 | # and use a container link instead. |
| 34 | "127.0.0.1:4000:4000", |
| 35 | ] |
| 36 | volumes: |
| 37 | - ./static:/opt/akkoma/static |
| 38 | - ./uploads:/opt/akkoma/uploads |
| 1 | #!/bin/sh |
| 2 | |
| 3 | ./bin/pleroma_ctl migrate |
| 4 | ./bin/pleroma start |