Browse Source

init

tags/v1.0.0
Robin Thoni 6 years ago
commit
ac043962ba
5 changed files with 52 additions and 0 deletions
  1. 1
    0
      .gitignore
  2. 39
    0
      docker-compose.yml
  3. 10
    0
      env
  4. 1
    0
      gogs/Dockerfile
  5. 1
    0
      postgresql/Dockerfile

+ 1
- 0
.gitignore View File

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

+ 39
- 0
docker-compose.yml View File

@@ -0,0 +1,39 @@
1
+version: '2'
2
+
3
+services:
4
+    postgresql:
5
+        build: ./postgresql
6
+        container_name: gogs-postgresql
7
+#        restart: unless-stopped
8
+        networks:
9
+            gogs.internal.docker:
10
+                aliases:
11
+                    - postgresql.gogs.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:35030:5432"
17
+        env_file:
18
+            - env
19
+
20
+    gogs:
21
+        build: ./gogs
22
+        container_name: gogs-gogs
23
+#        restart: unless-stopped
24
+        networks:
25
+            gogs.internal.docker:
26
+                aliases:
27
+                    - gogs.gogs.internal.docker
28
+        volumes:
29
+            - ./data/gogs/repositories:/data/git/gogs-repositories
30
+            - ./data/gogs/logs:/app/gogs/log
31
+            - ./data/gogs/conf:/data/gogs/conf
32
+        ports:
33
+            - "127.0.0.1:35021:22"
34
+            - "127.0.0.1:35022:3000"
35
+        env_file:
36
+            - env
37
+
38
+networks:
39
+      gogs.internal.docker:

+ 10
- 0
env View File

@@ -0,0 +1,10 @@
1
+POSTGRES_MASTER_MODE=1
2
+POSTGRES_HOST=postgresql.gogs.internal.docker
3
+POSTGRES_USER=gogs
4
+POSTGRES_PASSWORD=change_it
5
+POSTGRES_DB=gogs
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=gogs_ro
10
+POSTGRES_RO_PASSWORD=change_it

+ 1
- 0
gogs/Dockerfile View File

@@ -0,0 +1 @@
1
+FROM gogs/gogs:0.11.43

+ 1
- 0
postgresql/Dockerfile View File

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

Loading…
Cancel
Save