|
@@ -1,8 +1,8 @@
|
1
|
1
|
echo "Déploiement de Gitea"
|
2
|
2
|
echo "Installation des dépendances"
|
3
|
|
-apt update && apt dist-upgrade
|
4
|
|
-apt install -y apt-transport-https ca-certificates curl gnupg lsb-release docker docker-compose
|
5
|
|
-echo "version: \"2.1\"
|
|
3
|
+# sudo apt update && sudo apt dist-upgrade
|
|
4
|
+# sudo apt install -y apt-transport-https ca-certificates lsb-release docker docker-compose
|
|
5
|
+echo "version: \"3\"
|
6
|
6
|
services:
|
7
|
7
|
gitea:
|
8
|
8
|
image: gitea/gitea:1.15.6
|
|
@@ -10,40 +10,42 @@ services:
|
10
|
10
|
depends_on:
|
11
|
11
|
- db
|
12
|
12
|
environment:
|
13
|
|
- - GITEA__database__DB_TYPE=mysql
|
14
|
|
- - GITEA__database__HOST=db:3306
|
15
|
|
- - GITEA__database__NAME=gitea-db
|
|
13
|
+ - USER_UID=1000
|
|
14
|
+ - USER_GID=1000
|
|
15
|
+ - GITEA__database__DB_TYPE=postgres
|
|
16
|
+ - GITEA__database__HOST=db:5432
|
|
17
|
+ - GITEA__database__NAME=gitea
|
16
|
18
|
- GITEA__database__USER=gitea
|
17
|
|
- - GITEA__database__PASSWD=${GITEA_DB_PWD}
|
|
19
|
+ - GITEA__database__PASSWD=\${GITEA_DB_PWD}
|
18
|
20
|
networks:
|
19
|
21
|
- gitea
|
20
|
22
|
ports:
|
21
|
|
- - 3000:3000
|
22
|
|
- - 22:22
|
|
23
|
+ - \"3000:3000\"
|
|
24
|
+ - \"2222:22\"
|
23
|
25
|
volumes:
|
24
|
|
- - gitea-filestore:/data
|
|
26
|
+ - ./gitea:/data
|
|
27
|
+ - /etc/timezone:/etc/timezone:ro
|
|
28
|
+ - /etc/localtime:/etc/localtime:ro
|
25
|
29
|
restart: unless-stopped
|
26
|
30
|
|
27
|
31
|
db:
|
28
|
|
- image: mariadb
|
29
|
|
- ports:
|
30
|
|
- - 3306:3306
|
|
32
|
+ image: postgres:13-bullseye
|
31
|
33
|
volumes:
|
32
|
|
- - gitea-db:/var/lib/mysql
|
|
34
|
+ - ./postgres:/var/lib/postgresql/data
|
|
35
|
+ networks:
|
|
36
|
+ - gitea
|
33
|
37
|
environment:
|
34
|
|
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
|
35
|
|
- MYSQL_USER=gitea
|
36
|
|
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
|
37
|
|
- MYSQL_DATABASE=gitea
|
|
38
|
+ - POSTGRES_USER=gitea
|
|
39
|
+ - POSTGRES_PASSWORD=\${GITEA_DB_PWD}
|
|
40
|
+ - POSTGRES_DB=gitea
|
38
|
41
|
restart: unless-stopped
|
39
|
42
|
|
40
|
43
|
networks:
|
41
|
44
|
gitea:
|
42
|
45
|
external: false
|
43
|
46
|
|
44
|
|
-volumes:
|
45
|
|
- gitea-filestore:
|
46
|
|
- gitea-db:
|
47
|
47
|
"> ./docker-compose.yml
|
48
|
48
|
|
|
49
|
+cat docker-compose.yml
|
|
50
|
+
|
49
|
51
|
docker-compose up --build -d
|