WIP: Prebuilt docker image #803

Draft
floatingghost wants to merge 37 commits from customizable-docker-db into develop
3 changed files with 9 additions and 10 deletions
Showing only changes of commit 6e06308354 - Show all commits

View file

@ -56,10 +56,7 @@ RUN ln -s $HOME/bin/pleroma_ctl /bin/akkoma_ctl
ADD docker-entrypoint.sh $HOME/docker-entrypoint.sh
RUN adduser --system --home $HOME akkoma
USER akkoma
ENV AKKOMA_CONFIG_PATH=/opt/akkoma/config/config.exs
ENV AKKOMA_CONFIG_PATH=/opt/akkoma/config/prod.secret.exs
VOLUME uploads /opt/akkoma/uploads
VOLUME instance /opt/akkoma/instance
VOLUME config /opt/akkoma/config

View file

@ -3,6 +3,8 @@ services:
image: postgres:16-alpine
shm_size: 4gb
restart: unless-stopped
env_file:
- .env
environment: {
# This might seem insecure but is usually not a problem.
# You should leave this at the "akkoma" default.
@ -14,13 +16,14 @@ services:
POSTGRES_USER: akkoma,
POSTGRES_PASSWORD: akkoma,
}
user: ${DOCKER_USER}
volumes:
- ./pgdata:/var/lib/postgresql/data:z
akkoma:
image: akkoma/akkoma:next
restart: unless-stopped
user: ${DOCKER_USER}
links:
- db
ports: [
@ -34,9 +37,9 @@ services:
"127.0.0.1:4000:4000",
]
volumes:
- ./config:/opt/akkoma/config:z
- ./uploads:/opt/akkoma/uploads:z
- ./instance:/opt/akkoma/instance:z
- ./config:/opt/akkoma/config
- ./uploads:/opt/akkoma/uploads
- ./instance:/opt/akkoma/instance
# Copy this into docker-compose.override.yml and uncomment there if you want to use a reverse proxy
#proxy:

View file

@ -3,7 +3,6 @@
set -euo pipefail
mkdir -p pgdata
mkdir -p docker-setup-tmp
# This is sorta special in that we need the generated_config.exs to make it onto the host
# We can also automate the DB setup here!
@ -22,6 +21,6 @@ docker compose start db
docker compose run \
--rm \
-e "PGPASSWORD=akkoma" \
-v "$(pwd)/docker-setup-tmp/setup_db.psql:/docker-entrypoint-initdb.d/setup_db.sql" \
-v "$(pwd)/config:/docker-entrypoint-initdb.d" \
db