mirror of
https://github.com/terraphim/gitea-infrastructure.git
synced 2026-07-16 00:00:32 +02:00
- Change MINIO_ENDPOINT from IP to Docker hostname (s3storage) - Add ROOT_URL and DOMAIN settings for proper Gitea configuration - Give anonymous users Admin permission for bucket creation - Document SeaweedFS bucket creation process
170 lines
4.7 KiB
YAML
170 lines
4.7 KiB
YAML
version: "3"
|
|
# FIXME: create default gitea bucket using rclone or aws cli
|
|
networks:
|
|
gitea:
|
|
external: false
|
|
|
|
services:
|
|
server:
|
|
image: gitea/gitea:1.21.7
|
|
container_name: gitea
|
|
environment:
|
|
- USER_UID=1000
|
|
- USER_GID=1000
|
|
- GITEA__database__DB_TYPE=postgres
|
|
- GITEA__database__HOST=db:5432
|
|
- GITEA__database__NAME=gitea
|
|
- GITEA__database__USER=gitea
|
|
- GITEA__database__PASSWD=gitea
|
|
- GITEA__actions__ENABLE=true
|
|
- GITEA__repository__LFS_START_SERVER=true
|
|
- GITEA__repository__LFS_CONTENT_PATH=/data/lfs
|
|
- GITEA__storage__type=minio
|
|
- GITEA__storage__MINIO_ACCESS_KEY_ID=REDACTED_S3_ACCESS_KEY
|
|
- GITEA__storage__MINIO_SECRET_ACCESS_KEY=REDACTED_S3_SECRET_KEY
|
|
- GITEA__storage__MINIO_BUCKET=gitea
|
|
- GITEA__storage__MINIO_LOCATION=us-east-1
|
|
- GITEA__storage__MINIO_ENDPOINT=http://s3:8333
|
|
- GITEA__storage__MINIO_INSECURE_SKIP_VERIFY=false
|
|
- GITEA__storage__MINIO_USE_SSL=false
|
|
- GITEA__storage__SERVE_DIRECT=true
|
|
|
|
restart: always
|
|
networks:
|
|
- gitea
|
|
volumes:
|
|
- ./gitea:/data
|
|
- /etc/timezone:/etc/timezone:ro
|
|
- /etc/localtime:/etc/localtime:ro
|
|
ports:
|
|
- "3000:3000"
|
|
- "222:22"
|
|
depends_on:
|
|
- db
|
|
- s3
|
|
|
|
db:
|
|
image: postgres:15
|
|
restart: always
|
|
environment:
|
|
- POSTGRES_USER=gitea
|
|
- POSTGRES_PASSWORD=gitea
|
|
- POSTGRES_DB=gitea
|
|
networks:
|
|
- gitea
|
|
volumes:
|
|
- ./postgres:/var/lib/postgresql/data
|
|
master:
|
|
image: chrislusf/seaweedfs # use a remote image
|
|
ports:
|
|
- 9333:9333
|
|
- 19333:19333
|
|
- 9324:9324
|
|
command: "master -ip=master -ip.bind=0.0.0.0 -metricsPort=9324"
|
|
# healthcheck:
|
|
# test: [ "CMD", "curl", "--fail", "-I", "http://master:9333/cluster/healthz" ]
|
|
# interval: 1s
|
|
# timeout: 120s
|
|
volume:
|
|
image: chrislusf/seaweedfs # use a remote image
|
|
ports:
|
|
- 8080:8080
|
|
- 18080:18080
|
|
- 9325:9325
|
|
command: 'volume -mserver="master:9333" -ip.bind=0.0.0.0 -port=8080 -metricsPort=9325'
|
|
depends_on:
|
|
- master
|
|
# master:
|
|
# condition: service_healthy
|
|
volumes:
|
|
- ./seaweedfs:/data
|
|
filer:
|
|
image: chrislusf/seaweedfs # use a remote image
|
|
ports:
|
|
- 8888:8888
|
|
- 18888:18888
|
|
- 9326:9326
|
|
command: 'filer -master="master:9333" -ip.bind=0.0.0.0 -metricsPort=9326'
|
|
tty: true
|
|
stdin_open: true
|
|
depends_on:
|
|
- master
|
|
- volume
|
|
# volume:
|
|
# condition: service_healthy
|
|
volumes:
|
|
- ./seaweedfs_filter:/data
|
|
# healthcheck:
|
|
# test: [ "CMD", "curl", "--fail", "-I", "http://volume:8888" ]
|
|
# interval: 1s
|
|
# timeout: 30s
|
|
s3:
|
|
image: chrislusf/seaweedfs
|
|
container_name: s3storage
|
|
hostname: s3storage # use a remote image
|
|
ports:
|
|
- 8333:8333
|
|
- 9327:9327
|
|
command: 's3 -config=/etc/seaweedfs/s3.json -filer="filer:8888" -ip.bind=0.0.0.0 -metricsPort=9327'
|
|
depends_on:
|
|
- master
|
|
- volume
|
|
- filer
|
|
volumes:
|
|
- ./s3_config.json:/etc/seaweedfs/s3.json
|
|
nginx-gateway-s3:
|
|
image: ghcr.io/nginxinc/nginx-s3-gateway/nginx-oss-s3-gateway:latest
|
|
container_name: nginx-s3-gateway
|
|
ports:
|
|
- 9080:80
|
|
restart: on-failure
|
|
environment:
|
|
S3_BUCKET_NAME: gitea
|
|
AWS_ACCESS_KEY_ID: "REDACTED_S3_ACCESS_KEY"
|
|
AWS_SECRET_ACCESS_KEY: "REDACTED_S3_SECRET_KEY"
|
|
AWS_SIGS_VERSION: 4
|
|
S3_SERVER: s3
|
|
S3_SERVER_PORT: 8333
|
|
S3_SERVER_PROTO: http
|
|
S3_REGION: us-east-1
|
|
S3_STYLE: path
|
|
DEBUG: false
|
|
ALLOW_DIRECTORY_LIST: false
|
|
PROVIDE_INDEX_PAGE: true
|
|
APPEND_SLASH_FOR_POSSIBLE_DIRECTORY: true
|
|
DIRECTORY_LISTING_PATH_PREFIX: ""
|
|
PROXY_CACHE_MAX_SIZE: 10g
|
|
PROXY_CACHE_SLICE_SIZE: 1m
|
|
PROXY_CACHE_INACTIVE: 60m
|
|
PROXY_CACHE_VALID_OK: 1h
|
|
PROXY_CACHE_VALID_NOTFOUND: 1m
|
|
PROXY_CACHE_VALID_FORBIDDEN: 30s
|
|
# STRIP_LEADING_DIRECTORY_PATH: /somepath
|
|
depends_on:
|
|
- s3
|
|
prometheus:
|
|
image: prom/prometheus:v2.21.0
|
|
ports:
|
|
- 9000:9090
|
|
volumes:
|
|
- ./prometheus:/etc/prometheus
|
|
command: --web.enable-lifecycle --config.file=/etc/prometheus/prometheus.yml
|
|
depends_on:
|
|
- s3
|
|
# panamax:
|
|
# image: panamaxrs/panamax
|
|
# container_name: crates
|
|
# volumes:
|
|
# - ./crates_data/:/mirror
|
|
# # entrypoint: ["/usr/local/bin/panamax"]
|
|
# # command: "/usr/local/bin/panamax init /mirror &&
|
|
# # /usr/local/bin/panamax sync /mirror &&
|
|
# # /usr/local/bin/panamax serve /mirror"
|
|
# command:
|
|
# - sync /mirror
|
|
# # - serve
|
|
# ports:
|
|
# - 18080:8080
|
|
# environment:
|
|
# - USER_UID=1000
|
|
# - USER_GID=1000 |