angristan / docker-pleroma

Docker image for the Pleroma federated social network
https://git.pleroma.social/pleroma/pleroma/
MIT License
348 stars 76 forks source link

Update Dockerfile, add docker-compose.yml, and config.exs #25

Closed excodex closed 2 years ago

excodex commented 3 years ago

Introduction:

All-in-one Dockerfile, it could be more lightweight if the build environment made as a separate image.

I added exiftool imagemagick ffmpeg when building the image, because of better media management.

I found the prebuilt image location at git.pleroma.social:5050/pleroma/pleroma:latest the latest tag is the development version but stable also can be used. This commit uses the latest development branch from their git repo.

docker-compose.yml

You can easily edit the compose file for your own needs. Do not forget to change the Postgres password both in POSTGRES_PASSWORD and DB_PASS environment.

config.exs

You can freely modify the included config.exs file with your own needs, it will be accepted every time the stack starts. [!] Please do not modify the config.exs form line 37! From this line the keys are being generated.

Possible bugs:

It could be a headache if every time the stack restarts, new keys are generated. I tried it, and did not notice any difference.

To create a new user:

You need to use the new command because it is already complied to executable.

excodex commented 3 years ago

The docker-compose.yml file version is 2 because Portainer needs this. As far as I know it does not matter for this type of stack.

The container will not modify the config.exs, it is needed only for the start.

My vision is when you need to backup your stack, it is simpler to make an archive of one folder instead of search for docker volume files and make a separate backup of that.

Radtoo commented 3 years ago

The docker-compose.yml file version is 2 because Portainer needs this. As far as I know it does not matter for this type of stack.

I guess it can be bumped locally if needed.

The container will not modify the config.exs, it is needed only for the start.

So marking it :ro would be fine as a small improvement, right? - ./config.exs:/etc/pleroma/config.exs:ro

My vision is when you need to backup your stack, it is simpler to make an archive of one folder instead of search for docker volume files and make a separate backup of that.

Ah, backups! Yes, that makes sense, particularly with how awkward basic docker makes them.

Radtoo commented 3 years ago

Also, I think I can't use ./uploads:/pleroma/uploads but ./uploads:/var/libpleroma/uploads works. Same for static.

angristan commented 3 years ago

šŸ‘‹ Sorry for the late follow-up. If you're still OK with this, I want to merge it. šŸ™‚

Radtoo commented 3 years ago

I want to merge it. slightly_smiling_face

Recommending it even right now. Excodex' variant is better and has been working fine for me. Maybe version bump postgres/elixir again when you do.