IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an email to s dot adaszewski at gmail dot com. User accounts are meant only to report issues and/or generate pull requests. This is a purpose-specific Git hosting for ADARED projects. Thank you for your understanding!
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.

50 lines
1.6KB

  1. images:
  2. gitea: .
  3. gitea-logo: ../gitea-logo
  4. gitea-custom: ../gitea-custom
  5. gitea-disable: ../gitea-disable
  6. certbot-latest: ../certbot
  7. volumes:
  8. gitea-data: {}
  9. certbot-webroot: {}
  10. certbot-config-gitea: {}
  11. jails:
  12. gitea:
  13. meta:
  14. domains:
  15. - xyz.com
  16. - www.xyz.com
  17. image: gitea-disable
  18. mounts:
  19. gitea-data: /var/db/gitea
  20. ip4.addr: 127.0.8.1
  21. exec.start: |
  22. export IP4_ADDR=127.0.8.1 && \
  23. export SCHEME=http && \
  24. export DOMAIN_NAME=localhost:3001 && \
  25. export GITEA_CONF=/usr/local/etc/gitea/conf/app.ini && \
  26. chown git:git /var/db/gitea && \
  27. sed -i -e "s/127.0.0.1/${IP4_ADDR}/g" $GITEA_CONF && \
  28. sed -i -e "s/localhost/${DOMAIN_NAME}/g" $GITEA_CONF && \
  29. crudini --set --inplace $GITEA_CONF server ROOT_URL ${SCHEME}://${DOMAIN_NAME} && \
  30. if [ ! -f /var/db/gitea/gitea.db ]; then \
  31. su git -c 'gitea migrate -c $GITEA_CONF' && \
  32. su git -c 'gitea admin -c $GITEA_CONF create-user --username admin1 --password "AdminAdmin1+" --email "invaliduser@nonexistentdomain.com" --admin'; \
  33. fi && \
  34. /bin/sh /etc/rc
  35. certbot-gitea:
  36. image: certbot-latest
  37. mounts:
  38. certbot-webroot: /certbot/webroot
  39. certbot-config-gitea: /usr/local/etc/letsencrypt
  40. ip4.addr: 127.0.9.1
  41. exec.start: |
  42. if [ ! -f /usr/local/etc/letsencrypt/cli.ini ]; then
  43. echo 'webroot-path=/certbot/webroot' >>/usr/local/etc/letsencrypt/cli.ini && \
  44. echo 'authenticator=webroot' >>/usr/local/etc/letsencrypt/cli.ini;
  45. fi && \
  46. /bin/sh /etc/rc