added in docker and docker compose files

This commit is contained in:
Aaron Job
2023-09-10 10:31:15 +10:00
parent bcfefd019d
commit d233db45d9
2 changed files with 49 additions and 0 deletions

15
Dockerfile Normal file
View File

@@ -0,0 +1,15 @@
FROM python:3
WORKDIR /usr/src/app
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
RUN python -m venv pilot-env
RUN source pilot-env/bin/activate
RUN pip install -r requirements.txt
RUN python ./pilot/db_init.py
CMD [ "python", "./pilot/main.py" ]

34
docker-compose.yml Normal file
View File

@@ -0,0 +1,34 @@
version: '3'
services:
gpt-pilot:
environment:
- ENDPOINT=OPENAI
- OPENAI_API_KEY=
- MODEL_NAME=gpt-4
- MAX_TOKENS=8192
- DB_NAME=gpt-pilot
- DB_HOST=postgres
- DB_PORT=5432
- DB_USER=gpt-pilot
- DB_PASSWORD=gpt-pilot
build:
context: .
dockerfile: Dockerfile
pgadmin:
container_name: pgadmin4_container
image: dpage/pgadmin4
restart: always
environment:
PGADMIN_DEFAULT_EMAIL: admin@admin.com
PGADMIN_DEFAULT_PASSWORD: gpt-pilot
ports:
- "5050:80"
postgres:
image: postgres
restart: always
environment:
POSTGRES_USER: gpt-pilot
POSTGRES_PASSWORD: gpt-pilot
POSTGRES_DB: gpt-pilot
ports:
- "5432:5432"