gogs.yml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. version: "3.3"
  2. services:
  3. git:
  4. image: gogs/gogs
  5. deploy:
  6. labels:
  7. - com.df.notify=true
  8. - com.df.distribute=true
  9. - com.df.serviceDomain=git.sdsys.ru
  10. - com.df.servicePath=/
  11. - com.df.port=3000
  12. - com.df.httpsOnly=true
  13. ports:
  14. - "8022:22"
  15. volumes:
  16. - git_ldata:/data
  17. depends_on:
  18. - database
  19. networks:
  20. - proxy
  21. - git
  22. database:
  23. image: mariadb:10.3
  24. environment:
  25. MYSQL_ROOT_PASSWORD_FILE: /run/secrets/mysql_root
  26. volumes:
  27. - database_ldata:/var/lib/mysql
  28. configs:
  29. - source: gogs_db
  30. target: /docker-entrypoint-initdb.d/gogs_db.sql
  31. networks:
  32. - git
  33. secrets:
  34. - mysql_root
  35. secrets:
  36. mysql_root:
  37. file: ./mysql_root.txt
  38. configs:
  39. gogs_db:
  40. file: ./gogs_db.sql
  41. networks:
  42. proxy:
  43. external: true
  44. git:
  45. driver: overlay
  46. volumes:
  47. git_ldata:
  48. driver: local
  49. driver_opts:
  50. device: "/dev/disk/by-label/gogs_git"
  51. type: "xfs"
  52. database_ldata:
  53. driver: local
  54. driver_opts:
  55. device: "/dev/disk/by-label/gogs_db"
  56. type: "xfs"