Browse Source

init

tags/v1.0.0
Robin Thoni 5 years ago
commit
483f82e1b6
6 changed files with 76 additions and 0 deletions
  1. 1
    0
      .gitignore
  2. 23
    0
      README.md
  3. 37
    0
      docker-compose.yml
  4. 13
    0
      env
  5. 1
    0
      gitea/Dockerfile
  6. 1
    0
      postgresql/Dockerfile

+ 1
- 0
.gitignore View File

@@ -0,0 +1 @@
1
+/data

+ 23
- 0
README.md View File

@@ -0,0 +1,23 @@
1
+Configure real git user
2
+=======================
3
+
4
+Create git user:
5
+``` shell
6
+. ./env
7
+groupadd -g "${PUID}" git
8
+useradd -g git -u "${PGID}" git -d "$(pwd)"/data/gitea/data/git
9
+usermod -a -G docker git
10
+```
11
+
12
+
13
+/app/gogs/gogs: (chmod +x)
14
+```
15
+#!/bin/sh
16
+docker exec -e SSH_ORIGINAL_COMMAND="${SSH_ORIGINAL_COMMAND}" gitea-gitea $0 "$@"
17
+```
18
+
19
+/etc/ssh/sshd_config:
20
+```
21
+Match user git
22
+  PasswordAuthentication no
23
+```

+ 37
- 0
docker-compose.yml View File

@@ -0,0 +1,37 @@
1
+version: '2'
2
+
3
+services:
4
+    postgresql:
5
+        build: ./postgresql
6
+        container_name: gitea-postgresql
7
+#        restart: unless-stopped
8
+        networks:
9
+            gitea.internal.docker:
10
+                aliases:
11
+                    - postgresql.gitea.internal.docker
12
+        volumes:
13
+            - ./data/postgresql/data:/var/lib/postgresql/data
14
+            - ./data/postgresql/backup:/var/lib/postgresql/backup
15
+        ports:
16
+            - "127.0.0.1:35120:5432"
17
+        env_file:
18
+            - env
19
+
20
+    gitea:
21
+        build: ./gitea
22
+        container_name: gitea-gitea
23
+#        restart: unless-stopped
24
+        networks:
25
+            gitea.internal.docker:
26
+                aliases:
27
+                    - gitea.gitea.internal.docker
28
+        volumes:
29
+            - ./data/gitea/data:/data
30
+        ports:
31
+            - "127.0.0.1:35121:22"
32
+            - "127.0.0.1:35122:3000"
33
+        env_file:
34
+            - env
35
+
36
+networks:
37
+      gitea.internal.docker:

+ 13
- 0
env View File

@@ -0,0 +1,13 @@
1
+POSTGRES_MASTER_MODE=1
2
+POSTGRES_HOST=postgresql.gitea.internal.docker
3
+POSTGRES_USER=gitea
4
+POSTGRES_PASSWORD=change_it
5
+POSTGRES_DB=gitea
6
+POSTGRES_REP_USER=replicator
7
+POSTGRES_REP_PASSWORD=change_it
8
+POSTGRES_REP_ALLOWED_HOST=127.0.0.1/32
9
+POSTGRES_RO_USER=gitea_ro
10
+POSTGRES_RO_PASSWORD=change_it
11
+
12
+PUID=1100
13
+PGID=1100

+ 1
- 0
gitea/Dockerfile View File

@@ -0,0 +1 @@
1
+FROM gitea/gitea:1.7

+ 1
- 0
postgresql/Dockerfile View File

@@ -0,0 +1 @@
1
+FROM robinthoni/postgres-backup-multiarch:9.6-1.1.0

Loading…
Cancel
Save