A basic container for a private MediaGoblin media server.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 2.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. # MediaGoblin
  2. A basic container for a private MediaGoblin media server (https://mediagoblin.org/), including Nginx and uWSGI. Assumes a separate PostgreSQL database for persistence, and an email host for sending email notifications.
  3. Source at https://projects.torsion.org/witten/mediagoblin-docker
  4. ## Environment variables
  5. * `NOTIFICATION_EMAIL`: From address for MediaGoblin notification emails.
  6. * `EMAIL_HOSTNAME`: Hostname used to send outgoing notification emails.
  7. * `EMAIL_PORT`: Port number used to send outgoing notification emails.
  8. * `EMAIL_USERNAME`: Username used to connect to outgoing email host.
  9. * `EMAIL_PASSWORD`: Password used to connect to outgoing email host.
  10. * `EMAIL_TLS_SSL`: "true" or "false" for using TLS/SSL encryption for sending emails.
  11. * `EMAIL_STARTTLS`: "true" or "false" for using STARTTLS encryption for sending emails.
  12. * `DATABASE_URL`: Connection string for database to use for persistence, including credentials. See example below.
  13. ## Volumes
  14. * `/app/user_dev`: Location to store user media uploads.
  15. ## Ports
  16. * `80`: Only listens on port 80 for HTTP. Intended to be used in conjunction with an external reverse proxy like https://hub.docker.com/r/jwilder/nginx-proxy/ to provide HTTPS or anything else that's needed.
  17. ## Example
  18. ```console
  19. $ sudo docker run --detach --name=mediagoblin \
  20. --env NOTIFICATION_EMAIL=media@example.org \
  21. --env EMAIL_HOSTNAME=mail.example.org \
  22. --env EMAIL_PORT=587 \
  23. --env EMAIL_USERNAME=bob@example.org \
  24. --env EMAIL_PASSWORD=pass \
  25. --env EMAIL_TLS_SSL=false \
  26. --env EMAIL_STARTTLS=true \
  27. --env DATABASE_URL=postgresql://mediagoblin:password@database.example.org/mediagoblin \
  28. --volume /var/lib/mediagoblin/user_dev:/app/user_dev \
  29. --publish 80:80 \
  30. witten/mediagoblin:latest
  31. ```
  32. ## User management
  33. Since this image is for running a private MediaGoblin server, user
  34. self-registration is disabled. So, to add a user, first exec into the running
  35. Docker image:
  36. ```console
  37. $ sudo docker exec -it mediagoblin bash
  38. ```
  39. Where `mediagoblin` is the name of your running Docker container. If you don’t
  40. know the name to use, try looking in `docker ps` output.
  41. Then, add a user (follow the prompts):
  42. ```console
  43. # su - mediagoblin
  44. $ gmg --conf_file /app/mediagoblin_local.ini adduser
  45. ```
  46. Finally, if you want to make the new user into an admin user:
  47. ```console
  48. $ gmg --conf_file /app/mediagoblin_local.ini makeadmin username
  49. ```
  50. Where `username` corresponds to the user you added above.