Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Self-contained Docker Image #175

Open
gravityfargo opened this issue Dec 5, 2024 · 5 comments
Open

Self-contained Docker Image #175

gravityfargo opened this issue Dec 5, 2024 · 5 comments

Comments

@gravityfargo
Copy link

gravityfargo commented Dec 5, 2024

I posted this in the Discord, but I'll post here as well. I made a self contained docker container that works behind traefik with some instructions. I've run through the deployment I documented a few times and resulted in a functional pds each time. I made this for another project, but I figured others would find it useful.
Repo:
https://forgejo.gravityfargo.dev/gravityfargo/bluesky-pds-docker
Container:
Forgejo or Docker Hub

Hopefully a solution for #117 #85 #46

@jonesmac
Copy link

jonesmac commented Dec 8, 2024

Thanks for posting this. I'm thinking about modifying my pds setup to something similar. Questions for you. Are any of the following required from the current setup?

  1. Running as root on the host machine
  2. Running the containers with "host mode" enabled
  3. Running from the root directory

I feel like those three make hosting pds much more complex than it really needs to be.

@t0mtaylor
Copy link

I posted this in the Discord, but I'll post here as well. I made a self contained docker container that works behind traefik with some instructions. I've run through the deployment I documented a few times and resulted in a functional pds each time. I made this for another project, but I figured others would find it useful. Repo: https://forgejo.gravityfargo.dev/gravityfargo/bluesky-pds-docker Container: Forgejo or Docker Hub

services:
  bluesky-pds:
    container_name: bluesky-pds
    image: forgejo.gravityfargo.dev/gravityfargo/bluesky-pds:latest
    networks:
      - proxy
    env_file:
      PDS_ADMIN_PASSWORD: ""
      PDS_JWT_SECRET: ""
      PDS_PLC_ROTATION_KEY_K256_PRIVATE_KEY_HEX: ""
      PDS_HOSTNAME: example.com
      PDS_EMAIL_SMTP_URL: ""
      PDS_EMAIL_FROM_ADDRESS: ""
    volumes:
      - ./bluesky-pds:/pds
    labels:
      traefik.enable: "true"
      traefik.http.routers.bluesky-pds-insecure.entrypoints: http
      traefik.http.routers.bluesky-pds-insecure.rule: HostRegexp(`^.+\.example\.com$`) || Host(`example.social`)
      traefik.http.routers.bluesky-pds-secure.entrypoints: https
      traefik.http.routers.bluesky-pds-secure.rule: HostRegexp(`^.+\.example\.com$`) || Host(`example.social`)
      traefik.http.routers.bluesky-pds-secure.tls: "true"
      traefik.http.services.bluesky-pds.loadbalancer.server.scheme: http
      traefik.http.services.bluesky-pds.loadbalancer.server.port: 3000

Hopefully a solution for #117 #85 #46

Have tried running via Traefik, seems to work but crashes after 10 minutes with exit code 137 and no other error in logs

@gravityfargo
Copy link
Author

@t0mtaylor I'll take a look, I'm making some changes already.

For anyone else who wants to help out with this, please use this github repo to submit issues. I don't want to fill bluesky's repo with my external project's issues

@t0mtaylor
Copy link

@gravityfargo i'll post the issue on your git repo - gravityfargo/bluesky-pds-docker#2

@gravityfargo
Copy link
Author

Answering these questions for brevity.

@jonesmac

Running as root on the host machine

Not necessary, I pushed a new image out that runs as an unprivileged user with UID/PID configurable with environment variables.

Running the containers with "host mode" enabled

My personal use-case runs the container behind traefik on a proxy network, so no.

Running from the root directory

You can bind the container directory /pds anywhere on your host machine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants