1
0
Fork 1
mirror of https://akkoma.dev/AkkomaGang/akkoma.git synced 2024-11-17 18:49:15 +00:00

fix setup script

This commit is contained in:
Floatingghost 2024-06-04 10:16:58 +01:00
parent 44a5d0507b
commit 6e06308354
3 changed files with 9 additions and 10 deletions

View file

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

View file

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

View file

@ -3,7 +3,6 @@
set -euo pipefail set -euo pipefail
mkdir -p pgdata 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 # 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! # We can also automate the DB setup here!
@ -22,6 +21,6 @@ docker compose start db
docker compose run \ docker compose run \
--rm \ --rm \
-e "PGPASSWORD=akkoma" \ -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 db