Naposledy aktivní 1 week ago

Dockerfile Raw
1FROM alpine:3.22
2
3ARG TARGETARCH
4
5ENV FLAVOUR=${TARGETARCH}-musl
6
7ENV GROUP=akkoma
8ENV USER=akkoma
9
10ENV MIX_ENV=prod
11
12RUN awk 'NR==2' /etc/apk/repositories | sed 's/main/community/' | tee -a /etc/apk/repositories
13
14RUN apk update
15RUN apk add curl unzip ncurses file-dev
16RUN apk add imagemagick ffmpeg exiftool
17
18RUN addgroup -S $GROUP && adduser -S $USER -G $GROUP
19
20RUN mkdir /etc/akkoma
21
22COPY --chown=$USER:$GROUP --chmod=600 config.exs /etc/akkoma/
23
24RUN mkdir -p /opt/akkoma
25RUN chown $USER /opt/akkoma
26
27USER $USER
28
29WORKDIR /opt/akkoma
30
31RUN 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
35COPY --chown=$USER:$GROUP start.sh /opt/akkoma
36
37CMD ["/opt/akkoma/start.sh"]
docker-compose.yml Raw
1services:
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
start.sh Raw
1#!/bin/sh
2
3./bin/pleroma_ctl migrate
4./bin/pleroma start