From 78e6ac41428fd4ebd807dc863d686b55c9849cd8 Mon Sep 17 00:00:00 2001 From: Felix the Cat <48608131+felix-two-tone@users.noreply.github.com> Date: Tue, 15 Mar 2022 16:06:22 -0500 Subject: [PATCH] Update README.md (#45) Updated some of the info and steps to get going. Added a guide on making first admin user. --- README.md | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 203e61b..f7209f2 100644 --- a/README.md +++ b/README.md @@ -34,16 +34,16 @@ Create a folder for your Pleroma instance. Inside, you should have `Dockerfile` Here is the `docker-compose.yml`. You should change the `POSTGRES_PASSWORD` variable. ```yaml -version: '2.3' +version: '3.8' services: - postgres: - image: postgres:9.6-alpine - container_name: pleroma_postgres + db: + image: postgres:12.1-alpine + container_name: pleroma_db restart: always environment: POSTGRES_USER: pleroma - POSTGRES_PASSWORD: pleroma + POSTGRES_PASSWORD: ChangeMe! POSTGRES_DB: pleroma volumes: - ./postgres:/var/lib/postgresql/data @@ -54,11 +54,21 @@ services: container_name: pleroma_web restart: always ports: - - '127.0.0.1:4000:4000' + - '4000:4000' volumes: - - ./uploads:/pleroma/uploads + - ./uploads:/var/lib/pleroma/uploads + - ./static:/var/lib/pleroma/static + - ./config.exs:/etc/pleroma/config.exs:ro + environment: + DOMAIN: exmaple.com + INSTANCE_NAME: Pleroma + ADMIN_EMAIL: admin@example.com + NOTIFY_EMAIL: notify@example.com + DB_USER: pleroma + DB_PASS: ChangeMe! + DB_NAME: pleroma depends_on: - - postgres + - db ``` Create the upload and config folder and give write permissions for the uploads: @@ -71,8 +81,8 @@ chown -R 911:911 uploads Pleroma needs the `citext` PostgreSQL extension, here is how to add it: ```sh -docker-compose up -d postgres -docker exec -i pleroma_postgres psql -U pleroma -c "CREATE EXTENSION IF NOT EXISTS citext;" +docker-compose up -d db +docker exec -i pleroma_db psql -U pleroma -c "CREATE EXTENSION IF NOT EXISTS citext;" docker-compose down ``` @@ -157,6 +167,12 @@ Check if everything went well with: docker logs -f pleroma_web ``` +Make a new admin user using docker exec (replace fakeadmin with any username you'd like): + +```sh +docker exec -it pleroma_web sh ./bin/pleroma_ctl user new fakeadmin admin@test.net --admin +``` + You can now setup a Nginx reverse proxy in a container or on your host by using the [example Nginx config](https://git.pleroma.social/pleroma/pleroma/blob/develop/installation/pleroma.nginx). ### Update