view the rest of the comments
Selfhosted
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
Rules:
-
Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.
-
No spam posting.
-
Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.
-
Don't duplicate the full text of your blog or github here. Just post the link for folks to click.
-
Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
-
No trolling.
Resources:
- selfh.st Newsletter and index of selfhosted software and apps
- awesome-selfhosted software
- awesome-sysadmin resources
- Self-Hosted Podcast from Jupiter Broadcasting
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
Here is my docker-compose.yml
spoiler
version: "3.7"services: proxy: image: nginx:1-alpine ports: # actual and only port facing any connection from outside # Note, change the left number if port 1236 is already in use on your system # You could use port 80 if you won't use a reverse proxy - "8536:8536" volumes: - ./nginx_internal.conf:/etc/nginx/nginx.conf:ro,Z restart: always depends_on: - pictrs - lemmy-ui
lemmy: image: dessalines/lemmy:latest hostname: lemmy restart: always environment: - RUST_LOG="warn" volumes: - ./lemmy.hjson:/config/config.hjson:Z depends_on: - postgres - pictrs
lemmy-ui: image: dessalines/lemmy-ui:latest environment: - LEMMY_UI_LEMMY_INTERNAL_HOST=lemmy:8536 - LEMMY_UI_LEMMY_EXTERNAL_HOST=* - LEMMY_UI_HTTPS=true volumes: - ./volumes/lemmy-ui/extra_themes:/app/extra_themes depends_on: - lemmy restart: always
pictrs: image: asonix/pictrs:0.4.0-rc.7 # this needs to match the pictrs url in lemmy.hjson hostname: pictrs # we can set options to pictrs like this, here we set max. image size and forced format for conversion # entrypoint: /sbin/tini -- /usr/local/bin/pict-rs -p /mnt -m 4 --image-format webp environment: - PICTRS_OPENTELEMETRY_URL=http://otel:4137 - PICTRS__API_KEY=lemmy1234
- RUST_LOG=debug - RUST_BACKTRACE=full - PICTRS__MEDIA__VIDEO_CODEC=vp9 - PICTRS__MEDIA__GIF__MAX_WIDTH=256 - PICTRS__MEDIA__GIF__MAX_HEIGHT=256 - PICTRS__MEDIA__GIF__MAX_AREA=65536 - PICTRS__MEDIA__GIF__MAX_FRAME_COUNT=400 user: 991:991 volumes: - ./volumes/pictrs:/mnt:Z restart: always deploy: resources: limits: memory: 690m
postgres: image: postgres:15-alpine hostname: postgres environment: - POSTGRES_USER=lemmy - POSTGRES_PASSWORD=lemmy1234
- POSTGRES_DB=lemmy volumes: - ./volumes/postgres:/var/lib/postgresql/data:Z - ./customPostgresql.conf:/etc/postgresql.conf restart: always
postfix: image: mwader/postfix-relay environment: - POSTFIX_myhostname=lemmy.domain.com restart: "always"
This looks good to me. I suspect the problem is not with the compose file itself, but in the tool you're invoking - something must be wrong with docker-compose. Try using
docker compose up -d
instead ofdocker-compose up -d
(requires Docker v20.10.13+).Posting output of
docker-compose version
,docker version
anddocker compose version
may shine some light on this.Jesus man that was it. docker compose up -d solved it. Thank you so much
This means your
docker-compose
is very outdated or even broken.To give you some context, originally Docker Compose was a separate project. It's a separate program called
docker-compose
. It evolved for quite a while, and was eventually rewritten and included as a part of Docker itself, becaming a sub-command (docker compose
).Just uninstall the old Compose (so it won't cause you any issues) and keep only Docker.
Alright now im getting
There was an error on the server. Try refreshing your browser. If that doesn't work, come back at a later time. If the problem persists, you can seek help in the Lemmy support community or Lemmy Matrix room.
but thats progress
This means Lemmy container is up and running, but there is some error on the backend that prevents it from functioning correctly. A pretty wild guess, but it's probably something with the database.
docker compose logs
may tell a bit more about what's going on. Check out this page https://join-lemmy.org/docs/administration/troubleshooting.html (just remember to replacedocker-compose
withdocker compose
- again, I specifically recommend to uninstalldocker-compose
so it won't accidentally mess things up).If it's not something obvious, one thing you may try is tear everything down (
docker compose down -v
), changelemmy:latest
tolemmy:0.18.1
in your Compose file, and try starting again. This will use explicit version number and it may help if thelatest
tag is not something we expect it to be. E.g. I had issues spinning up clean 0.17.4 - it had a bug in DB migrations that was supposed to be fixed in 0.18.Yeah I figured some port was not enabled
where did you install Docker from? is it the docker repo or somewhere else?
Edit: check this out - https://docs.docker.com/engine/install/centos/
Yeah its from here
has docker got version locked in yum?