Questions on building a standalone diaspora for a single user

Hey all.

Some people in a local open source group were talking about a diaspora docker instance. There are several docker images and dockerfiles out there and that seems like a decent approach to take but as far as I know there is no “official” docker image for diaspora. Looking at the dockerfiles I see that they end up installing apache or nginx + mysql + redis etc so they have lots of daemons running in the same container. This goes against the docker philosophy of having one server per container but I guess it’s better than running a swarm or having a kubernetes install.

I was thinking that if it was possible to run diaspora on jruby it would be possible to create a jar file that somebody could run with just a “java -jar diaspora.jar” or something but in order to make that happen diaspora would need to be able to use sqlite, not need to depend on redis (AFIK this is for sidekiq), and use puma.

Does this seem feasible to you guys? How hard would be to replace sidekiq with something else? If we are using jruby spinning off a thread for background tasks would be no problem. I understand that there are jruby alternatives to imagemagick too.

Anyway I thought it might be an interesting discussion to see if some of the dependencies can be reduced or removed.

Cheers.

Hello,

some work on this has been done here: https://gitlab.koehn.com/docker/diaspora/

I have also managed to run it successfully in Kubernetes. the ‘konvert’ tool to convert docker-compose.yml files into kubernetes manifests works almost correct, I just needed to change how the configuration files are (volume) mounted.

I used a configuration map containing both files. To create it, just put both files (once adapted to your configuration) in a directory and run:

kubectl -n $NAMESPACE create configmap diaspora-config --from-file=$DIRECTORY/

and then changed the mounts in the diaspora-deployment.yaml manifest as follows

- mountPath: /home/diaspora/diaspora/config/database.yml
  subPath: database.yml
  name: diaspora-config
  readOnly: true
- mountPath: /home/diaspora/diaspora/config/diaspora.yml
  subPath: diaspora.yml
  name: diaspora-config
  readOnly: true

And further down for the volumes:

  volumes:
  - name: diaspora-images
    persistentVolumeClaim:
      claimName: diaspora-images
  - name: diaspora-config
    configMap:
      name: diaspora-config