summaryrefslogtreecommitdiff
path: root/docker-compose.yml
blob: 701b5b32484021e9c0c1d81bab2e42cf7b8a095a (plain) (blame)
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
version: "3"

services:
  caddy:
    image: caddy:2.6.2-alpine
    container_name: gateway
    restart: unless-stopped
    ports:
      - "80:80"
      - "443:443"
      - "443:443/udp"
    volumes:
      - ./etc/Caddyfile:/etc/caddy/Caddyfile
      - caddy_data:/data
      - blog_data:/var/www/neonxp.dev/public
    networks:
      - gateway

  forgejo_server:
    image: codeberg.org/forgejo/forgejo:1.20.5-0
    container_name: git
    env_file:
      - .env
    environment:
      - USER_UID=1001
      - USER_GID=1001
      - TZ=Europe/Moscow
      - USER=git
      - FORGEJO__database__DB_TYPE=postgres
      - FORGEJO__database__HOST=forgejo_db:5432
      - FORGEJO__database__NAME=${FORGEJO_DATABASE}
      - FORGEJO__database__USER=${FORGEJO_USERNAME}
      - FORGEJO__database__PASSWD=${FORGEJO_PASSWORD}
      - FORGEJO__server__DISABLE_SSH = false
      - FORGEJO__server__SSH_PORT = 22
      - FORGEJO__server__SSH_LISTEN_PORT = 22
    restart: always
    networks:
      - forgejo
      - gateway
    volumes:
      - /home/git/.ssh/:/data/git/.ssh
      - forgejo_data:/data
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    ports:
      - "127.0.0.1:2222:22"
    depends_on:
      - forgejo_db

  forgejo_db:
    image: postgres:13-alpine
    container_name: forgejo_db
    restart: always
    env_file:
      - .env
    environment:
      - USER_UID=1001
      - USER_GID=1001
      - TZ=Europe/Moscow
      - POSTGRES_DATABASE=${FORGEJO_DATABASE}
      - POSTGRES_USER=${FORGEJO_USERNAME}
      - POSTGRES_PASSWORD=${FORGEJO_PASSWORD}
    healthcheck:
      test: /usr/bin/pg_isready -U ${FORGEJO_USERNAME} -d ${FORGEJO_DATABASE}
      interval: 5s
      timeout: 10s
      retries: 120
    networks:
      - forgejo
    volumes:
      - forgejo_db_data:/var/lib/postgresql/data
      
  woodpecker_server:
    image: woodpeckerci/woodpecker-server:latest
    container_name: woodpecker_server
    volumes:
      - woodpecker_data:/var/lib/woodpecker/
    environment:
      - WOODPECKER_OPEN=true
      - WOODPECKER_GITEA=true
      - WOODPECKER_GITEA_URL=https://gitrepo.ru
      - WOODPECKER_GITEA_CLIENT=${FORGEJO_WOODPECKER_CLIENT}
      - WOODPECKER_GITEA_SECRET=${FORGEJO_WOODPECKER_SECRET}
      - WOODPECKER_HOST=https://ci.gitrepo.ru
      - WOODPECKER_ADMIN=neonxp
      - WOODPECKER_AGENT_SECRET=${WOODPECKER_AGENT_SECRET}
    networks:
      - forgejo
      - gateway
    depends_on:
      - forgejo_server

  woodpecker_agent:
    image: woodpeckerci/woodpecker-agent:latest
    container_name: woodpecker_agent
    command: agent
    restart: always
    depends_on:
      - woodpecker_server
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - WOODPECKER_SERVER=woodpecker_server:9000
      - WOODPECKER_AGENT_SECRET=${WOODPECKER_AGENT_SECRET}
    networks:
      - forgejo

  goproxy_server:
    image: gitrepo.ru/neonxp/pkg:latest
    container_name: goproxy_server
    restart: unless-stopped
    volumes:
      - ./etc/pkg.json:/usr/app/config.json
    networks:
      - gateway

  opengist_server:
    image: ghcr.io/thomiceli/opengist:1
    container_name: opengist_server
    restart: unless-stopped
    volumes:
      - opengist_data:/root/.opengist
    environment:
      CONFIG: |
        log-level: info
        ssh.git-enabled: false
    networks:
      - gateway

  remark_server:
    image: umputun/remark42:latest
    container_name: remark_server
    hostname: "remark42"
    restart: always

    logging:
      driver: json-file
      options:
        max-size: "10m"
        max-file: "5"

    environment:
      - REMARK_URL=https://comments.neonxp.dev
      - SITE=neonxp_dev
      - SECRET=8Wwt1o6G5nVBMJot
      - DEBUG=false
      - AUTH_EMAIL_ENABLE=true
      - AUTH_TELEGRAM=true
      - AUTH_EMAIL_FROM=i@neonxp.dev
      - NOTIFY_EMAIL_FROM=i@neonxp.dev
      - AUTH_EMAIL_SUBJ=NeonXP.dev comments
      - NOTIFY_USERS=telegram,email
      - NOTIFY_ADMINS=telegram,email
      - NOTIFY_TELEGRAM_CHAN=760557
      - TELEGRAM_TOKEN=279146841:AAE9Yd2WMkFCadnk2hNtF3By1_gAhbO3usM
      - SMTP_HOST=smtp.mail.ru
      - SMTP_PORT=465
      - SMTP_USERNAME=i@neonxp.dev
      - SMTP_PASSWORD=m317T2KuCgXdxfKh5BjK
      - SMTP_LOGIN_AUTH=true
      - SMTP_TLS=true
      - EMOJI=true
      - ALLOWED_HOSTS=neonxp.dev
      - AUTH_SAME_SITE=none
      - ADMIN_SHARED_ID=email_0298a691a8d2e6e6e539bccdff2e30eca6df0280,telegram_b4201451070ba78a1742cd54d4223eccc0249c1a
      # Enable it only for the initial comment import or for manual backups.
      # Do not leave the server running with the ADMIN_PASSWD set if you don't have an intention
      # to keep creating backups manually!
      # - ADMIN_PASSWD=<your secret password>
    volumes:
      - remark_data:/srv/var
    networks:
      - gateway

  blog:
    image: gitrepo.ru/neonxp/blog:latest
    command: ["hugo", "-v"]
    volumes:
      - blog_data:/app/public

volumes:
  caddy_data:
  opengist_data:
  remark_data:
  forgejo_data:
  forgejo_db_data:
  woodpecker_data:
  blog_data:

networks:
    gateway:
    forgejo:
        external: false