Advertisement
4nd3rs0n

Untitled

Dec 26th, 2023
22
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. version: "3.8"
  2.  
  3. networks:
  4. infra:
  5. driver: "bridge"
  6. external: "false"
  7.  
  8. secrets:
  9. postgres_db_password:
  10. file: .secrets/gitea/psql_password.txt
  11.  
  12. services:
  13. gitea:
  14. image: gitea/gitea:latest
  15. container_name: gitea
  16. environment:
  17. - USER_UID=1000
  18. - USER_GID=1000
  19.  
  20. - GITEA__database__DB_TYPE=postgres
  21. - GITEA__database__HOST=postgres:5432
  22. - GITEA__database__NAME=gitea
  23. - GITEA__database__USER=gitea
  24. - GITEA__database__PASSWD_FILE=/run/secrets/postgres_db_password
  25. restart: always
  26. depends_on:
  27. - postgres
  28. networks:
  29. - infra
  30. volumes:
  31. - ./data/gitea:/data
  32. - /etc/timezone:/etc/timezone:ro
  33. - /etc/localtime:/etc/localtime:ro
  34. ports:
  35. - "3000:3000"
  36. - "222:22" # SSH port changed to prevent conflicts
  37. secrets:
  38. - postgres_db_password
  39.  
  40.  
  41. postgres:
  42. image: postgres:latest
  43. container_name: postgres-gitea
  44. networks:
  45. - infra
  46. volumes:
  47. - ./data/postgres:/var/lib/postgresql/data
  48. environment:
  49. - POSTGRES_USER=gitea
  50. - POSTGRES_DB=gitea
  51. - POSTGRES_PASSWORD_FILE=/run/secrets/postgres_db_password
  52. secrets:
  53. - postgres_db_password
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement