fix: Clean up and simplify docker entrypoint (#1235) (#1259)

Co-authored-by: Ethan Knox <norton120@gmail.com>
This commit is contained in:
Sarah Wooders
2024-04-18 22:39:11 -07:00
committed by GitHub
parent d7d1bd1516
commit f3b5f5e7db
28 changed files with 1077 additions and 1029 deletions

View File

@@ -1,21 +1,30 @@
version: '3.8'
services:
pgvector_db:
image: ankane/pgvector:latest
memgpt_db:
image: ankane/pgvector:v0.5.1
networks:
default:
aliases:
- pgvector_db
- memgpt-db
environment:
- POSTGRES_USER=${MEMGPT_PG_USER}
- POSTGRES_PASSWORD=${MEMGPT_PG_PASSWORD}
- POSTGRES_DB=${MEMGPT_PG_DB}
volumes:
- pgdata:/var/lib/postgresql/data
- ./.persist/pgdata:/var/lib/postgresql/data
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
ports:
- "5432:5432"
memgpt_server:
image: memgpt/memgpt-server:latest
hostname: memgpt-server
depends_on:
- pgvector_db
- memgpt_db
ports:
- "8083:8083"
- "8283:8283"
env_file:
- .env
environment:
- MEMGPT_PGURI=postgresql://${MEMGPT_PG_USER}:${MEMGPT_PG_PASSWORD}@pgvector_db:5432/${MEMGPT_PG_DB}
- MEMGPT_SERVER_PASS=${MEMGPT_SERVER_PASS} # memgpt server password
@@ -26,8 +35,10 @@ services:
volumes:
- ./configs/server_config.yaml:/root/.memgpt/config # config file
- ~/.memgpt/credentials:/root/.memgpt/credentials # credentials file
memgpt_nginx:
hostname: memgpt-nginx
image: nginx:stable-alpine3.17-slim
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
ports:
- "8083:8083"
volumes:
pgdata:
- "80:80"