From 791fef17447287c3d76a200e069c34f469750cd4 Mon Sep 17 00:00:00 2001 From: CorrectRoadH Date: Tue, 5 Dec 2023 22:38:49 +0800 Subject: [PATCH] feat(docker): wip add docker-compose --- docker-compose.yaml | 52 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/docker-compose.yaml b/docker-compose.yaml index e69de29..d1ef692 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -0,0 +1,52 @@ +# 非 host 版本, 不使用本机代理 +version: '3.3' +services: + pg: + image: postgres:16.1-bullseye + container_name: pg + restart: always + ports: # 生产环境建议不要暴露 + - 5432:5432 + networks: + - likit + environment: + - POSTGRES_USER=username + - POSTGRES_PASSWORD=password + - POSTGRES_DB=postgres + volumes: + - ./pg/data:/var/lib/postgresql/data + redis: + image: redis:alpine3.18 + container_name: redis + # image: registry.cn-hangzhou.aliyuncs.com/fastgpt/mongo:5.0.18 # 阿里云 + restart: always + ports: # 生产环境建议不要暴露 + - 6379:6379 + networks: + - likit + environment: + - REDIS_PASSWORD=password + volumes: + - ./redis/data:/data + likit: + container_name: likit + image: correctroad/likit:latest # git + ports: + - 3000:8080 + networks: + - likit + depends_on: + - redis + - pg + restart: always + environment: + - REDIS_HOST=redis + - REDIS_PORT=6379 + - REDIS_PASSWORD=password + - POSTGRES_HOST=pg + - POSTGRES_PORT=5432 + - POSTGRES_USER=username + - POSTGRES_PASSWORD=password + - POSTGRES_DATABASE=postgres +networks: + likit: \ No newline at end of file