59 lines
1.3 KiB
YAML
59 lines
1.3 KiB
YAML
version: "3.8"
|
|
|
|
networks:
|
|
life_net:
|
|
name: lucky.net
|
|
driver: bridge
|
|
|
|
volumes:
|
|
gitea_data:
|
|
postgres_data:
|
|
redis_data:
|
|
|
|
services:
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: lucky.net_redis
|
|
restart: unless-stopped
|
|
networks:
|
|
- life_net
|
|
volumes:
|
|
- redis_data:/data
|
|
command: ["redis-server", "--appendonly", "yes", "--requirepass", "123123"]
|
|
ports:
|
|
- "6379:6379"
|
|
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
container_name: lucky.net_postgres
|
|
restart: unless-stopped
|
|
networks:
|
|
- life_net
|
|
environment:
|
|
POSTGRES_DB: root
|
|
POSTGRES_USER: root
|
|
POSTGRES_PASSWORD: 123123
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
ports:
|
|
- "5432:5432"
|
|
|
|
gitea:
|
|
image: gitea/gitea:1.22.0
|
|
container_name: lucky.net_gitea
|
|
restart: unless-stopped
|
|
networks:
|
|
- life_net
|
|
ports:
|
|
- "3000:3000" # HTTP
|
|
- "2222:22" # SSH
|
|
environment:
|
|
# ------------- server -------------
|
|
# 首次启动时建议按实际域名改这里(本地用 localhost 即可)。
|
|
GITEA__server__DOMAIN: localhost
|
|
GITEA__server__ROOT_URL: http://localhost:3000/
|
|
GITEA__server__HTTP_PORT: "3000"
|
|
GITEA__server__SSH_PORT: "22"
|
|
|
|
volumes:
|
|
- gitea_data:/data |