-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
105 lines (100 loc) · 2.52 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
version: '3.8'
services:
gitlab:
container_name: gitlab-ce
image: gitlab/gitlab-ce:latest
restart: unless-stopped
profiles: [gitlab]
hostname: gitlablocal.dev
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'http://gitlablocal.dev'
gitlab_rails['gitlab_shell_ssh_port'] = 1022
ports:
- "80:80"
- "443:443"
- "1022:22"
volumes:
- ./gitlab/config:/etc/gitlab
- ./gitlab/logs:/var/log/gitlab
- ./gitlab/data:/var/opt/gitlab
networks:
gitprovider:
ipv4_address: 10.5.0.5
healthcheck:
test: ["CMD", "/opt/gitlab/bin/gitlab-healthcheck", "--fail", "--max-time", "10"]
interval: 60s
timeout: 10s
retries: 3
start_period: 60s
runner:
image: gitlab/gitlab-runner:alpine
profiles: [gitlab]
restart: unless-stopped
container_name: gitlab-runner
hostname: gitlab-runner.dev
depends_on:
gitlab:
condition: service_healthy
volumes:
- ./config/gitlab-runner:/etc/gitlab-runner
- /run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock
networks:
gitprovider:
ipv4_address: 10.5.0.6
gitea:
image: gitea/gitea:latest
container_name: gitea
profiles: [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_DB_PASSWORD:-gitea}
restart: unless-stopped
networks:
gitprovider:
ipv4_address: 10.5.0.7
volumes:
- ./gitea:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "3000:3000"
- "2222:22"
depends_on:
db:
condition: service_healthy
healthcheck:
test: ["CMD", "/usr/sbin/nginx", "-t"]
interval: 60s
timeout: 10s
retries: 3
db:
image: postgres:16-alpine
profiles: [gitea]
restart: unless-stopped
environment:
- POSTGRES_USER=gitea
- POSTGRES_PASSWORD=${GITEA_DB_PASSWORD:-gitea}
- POSTGRES_DB=gitea
networks:
gitprovider:
ipv4_address: 10.5.0.8
volumes:
- ./postgres:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U gitea"]
interval: 10s
timeout: 5s
retries: 5
networks:
gitprovider:
driver: bridge
ipam:
config:
- subnet: 10.5.0.0/16
gateway: 10.5.0.1