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.

49 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 DOMAIN_NAME=xyz.com && \
  24. export GITEA_CONF=/usr/local/etc/gitea/conf/app.ini && \
  25. chown git:git /var/db/gitea && \
  26. sed -i -e "s/127.0.0.1/${IP4_ADDR}/g" $GITEA_CONF && \
  27. sed -i -e "s/localhost/${DOMAIN_NAME}/g" $GITEA_CONF && \
  28. crudini --set --inplace $GITEA_CONF server ROOT_URL https://${DOMAIN_NAME} && \
  29. if [ ! -f /var/db/gitea/gitea.db ]; then \
  30. su git -c 'gitea migrate -c $GITEA_CONF' && \
  31. su git -c 'gitea admin -c $GITEA_CONF create-user --username admin1 --password "AdminAdmin1+" --email "invaliduser@nonexistentdomain.com" --admin'; \
  32. fi && \
  33. /bin/sh /etc/rc
  34. certbot-gitea:
  35. image: certbot-latest
  36. mounts:
  37. certbot-webroot: /certbot/webroot
  38. certbot-config-gitea: /usr/local/etc/letsencrypt
  39. ip4.addr: 127.0.9.1
  40. exec.start: |
  41. if [ ! -f /usr/local/etc/letsencrypt/cli.ini ]; then
  42. echo 'webroot-path=/certbot/webroot' >>/usr/local/etc/letsencrypt/cli.ini && \
  43. echo 'authenticator=webroot' >>/usr/local/etc/letsencrypt/cli.ini;
  44. fi && \
  45. /bin/sh /etc/rc