From 1a1adb199824ec62ce1a672a2d81db9eae4ace67 Mon Sep 17 00:00:00 2001 From: Tanguy Herbron Date: Fri, 30 Jun 2023 13:11:27 +0200 Subject: [PATCH] feat(*): Add docker-compose file --- docker-compose.yml | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..ccf335c --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,45 @@ +version: "3" + +networks: + gitea: + external: false + +services: + server: + image: gitea/gitea:1.19 + container_name: gitea + environment: + - USER_UID=1000 + - USER_GID=1000 + - GITEA__database__DB_TYPE=postgres + - GITEA__database__HOST=db:5432 + - GITEA__database__NAME=gitea + - GITEA__database__USER=gitea + - GITEA__database__PASSWD=gitea + restart: unless-stopped + networks: + - gitea + volumes: + - ./gitea:/data + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro + ports: + - "3000:3000" + - "222:22" + depends_on: + - db + + db: + image: postgres:14 + restart: always + environment: + - POSTGRES_USER=gitea + - POSTGRES_PASSWORD=gitea + - POSTGRES_DB=gitea + networks: + - gitea + volumes: + - ./postgres:/var/lib/postgresql/data + ports: + - "5432:5432" +