From 77b7d8a7848edf43621418163a4346b6d58ea4e7 Mon Sep 17 00:00:00 2001 From: David Rotermund Date: Sat, 19 Oct 2024 16:24:27 +0200 Subject: [PATCH] Create compose.yaml --- compose.yaml | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 compose.yaml diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..9554649 --- /dev/null +++ b/compose.yaml @@ -0,0 +1,59 @@ +networks: + forgejo: + external: false + +services: + server: + image: forgejo-aneksajo:8.0.3 + container_name: forgejo + environment: + - USER_UID=1000 + - USER_GID=1000 + - FORGEJO__database__DB_TYPE=postgres + - FORGEJO__database__HOST=db:5432 + - FORGEJO__database__NAME=forgejo + - FORGEJO__database__USER=forgejo + - FORGEJO__database__PASSWD=${DBPASSWD} + restart: always + networks: + - forgejo + volumes: + - /mnt/raid1/forgejo:/data + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro + ports: + - "222:22" + depends_on: + - db + + db: + image: postgres:14 + restart: always + environment: + - POSTGRES_USER=forgejo + - POSTGRES_PASSWORD=${DBPASSWD} + - POSTGRES_DB=forgejo + networks: + - forgejo + volumes: + - /mnt/raid1/postgres:/var/lib/postgresql/data + + nginx: + image: nginx:stable-alpine + hostname: nginx + restart: always + volumes: + - "/root/forgejo/key.pem:/certs/nginx_key.pem:ro" + - "/root/forgejo/ca.pem:/certs/nginx_certificate.pem:ro" + - "/root/forgejo/nginx.conf:/etc/nginx/nginx.conf:ro" + ports: + - "0.0.0.0:443:443" + - "0.0.0.0:80:80" + environment: + NGINX_WORKER_PROCESSES: "4" + NGINX_WORKER_CONNECTIONS: "768" + networks: + - forgejo + depends_on: + - server +