Browse Source

ajout de mariadb dans docker-compose.yml

Lou 3 years ago
parent
commit
21cfbaa406
3 changed files with 30 additions and 0 deletions
  1. 1
    0
      docker/.gitignore
  2. 0
    0
      docker/docker-compose.yml
  3. 29
    0
      docker/init.sh

+ 1
- 0
docker/.gitignore View File

@@ -0,0 +1 @@
1
+.env

+ 0
- 0
docker/docker-compose.yml View File


+ 29
- 0
docker/init.sh View File

@@ -0,0 +1,29 @@
1
+echo "Déploiement de Gitea"
2
+echo "Installation des dépendances"
3
+apt update && apt dist-upgrade
4
+apt install -y --no-recommand apt-transport-https ca-certificates curl gnupg lsb-release docker docker-compose
5
+read -p "Port : " port
6
+echo "version:\1.0\"
7
+services:
8
+    gitea:
9
+        image: gitea/gitea:1.15.6
10
+    	container_name: gitea-1.15.6
11
+		ports:
12
+	    	- $port:$port
13
+			- 22:22
14
+		volumes:
15
+			- filestore:/data:/data
16
+		restart: unless-stopped
17
+	
18
+	db:
19
+		image: mariadb:10.7.1-focal
20
+		ports:
21
+			-3306:3306
22
+		volumes:
23
+			- /opt/mariadb/backup:/var/lib/mysql
24
+		environment:
25
+			MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
26
+		restart: unless-stopped
27
+"> docker-compose.yml
28
+
29
+docker-compose up

Loading…
Cancel
Save