LONGYKING
commited on
Commit
·
aaa8cfe
1
Parent(s):
a8e2f82
added docker
Browse files- .dockerignore +1 -1
- Dockerfile +9 -3
- Procfile +1 -1
- docker-compose.yml +24 -0
- node_modules/.yarn-integrity +0 -10
- requirements.txt +1 -0
- yarn.lock +0 -4
.dockerignore
CHANGED
|
@@ -59,7 +59,7 @@ cover/
|
|
| 59 |
.venv
|
| 60 |
|
| 61 |
# Environments
|
| 62 |
-
|
| 63 |
.venv/
|
| 64 |
env/
|
| 65 |
venv/
|
|
|
|
| 59 |
.venv
|
| 60 |
|
| 61 |
# Environments
|
| 62 |
+
.env
|
| 63 |
.venv/
|
| 64 |
env/
|
| 65 |
venv/
|
Dockerfile
CHANGED
|
@@ -1,11 +1,17 @@
|
|
| 1 |
# Use an official Python runtime as a parent image
|
| 2 |
-
FROM python:3.
|
| 3 |
|
| 4 |
# Set the working directory in the container
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
#
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
# Install any needed packages specified in requirements.txt
|
| 11 |
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
| 1 |
# Use an official Python runtime as a parent image
|
| 2 |
+
FROM python:3.11-slim
|
| 3 |
|
| 4 |
# Set the working directory in the container
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# Install PostgreSQL client libraries and development headers
|
| 8 |
+
RUN apt-get update && apt-get install -y \
|
| 9 |
+
libpq-dev \
|
| 10 |
+
gcc \
|
| 11 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 12 |
+
|
| 13 |
+
# Copy the rest of the application code into the container
|
| 14 |
+
COPY . .
|
| 15 |
|
| 16 |
# Install any needed packages specified in requirements.txt
|
| 17 |
RUN pip install --no-cache-dir -r requirements.txt
|
Procfile
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
web: docker run -p $PORT:8000 chatxbt-assistant
|
|
|
|
| 1 |
+
web: docker run -p $PORT:8000 --env-file .env chatxbt-web3-ai-assistant
|
docker-compose.yml
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
services:
|
| 2 |
+
app:
|
| 3 |
+
image: chatxbt-web3-ai-assistant
|
| 4 |
+
build: .
|
| 5 |
+
ports:
|
| 6 |
+
- "8000:8000"
|
| 7 |
+
env_file:
|
| 8 |
+
- .env
|
| 9 |
+
depends_on:
|
| 10 |
+
- db
|
| 11 |
+
environment:
|
| 12 |
+
- DATABASE_URL=postgresql://postgres:postgres@db:5432/mydatabase
|
| 13 |
+
|
| 14 |
+
db:
|
| 15 |
+
image: postgres:13
|
| 16 |
+
environment:
|
| 17 |
+
POSTGRES_USER: postgres
|
| 18 |
+
POSTGRES_PASSWORD: postgres
|
| 19 |
+
POSTGRES_DB: mydatabase
|
| 20 |
+
volumes:
|
| 21 |
+
- postgres_data:/var/lib/postgresql/data
|
| 22 |
+
|
| 23 |
+
volumes:
|
| 24 |
+
postgres_data:
|
node_modules/.yarn-integrity
DELETED
|
@@ -1,10 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"systemParams": "darwin-x64-115",
|
| 3 |
-
"modulesFolders": [],
|
| 4 |
-
"flags": [],
|
| 5 |
-
"linkedModules": [],
|
| 6 |
-
"topLevelPatterns": [],
|
| 7 |
-
"lockfileEntries": {},
|
| 8 |
-
"files": [],
|
| 9 |
-
"artifacts": {}
|
| 10 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
requirements.txt
CHANGED
|
@@ -24,6 +24,7 @@ botocore==1.34.106
|
|
| 24 |
certifi==2024.6.2
|
| 25 |
chainlit==1.1.300
|
| 26 |
charset-normalizer==3.3.2
|
|
|
|
| 27 |
chevron==0.14.0
|
| 28 |
ckzg==1.0.2
|
| 29 |
click==8.1.7
|
|
|
|
| 24 |
certifi==2024.6.2
|
| 25 |
chainlit==1.1.300
|
| 26 |
charset-normalizer==3.3.2
|
| 27 |
+
psycopg2-binary==2.9.9
|
| 28 |
chevron==0.14.0
|
| 29 |
ckzg==1.0.2
|
| 30 |
click==8.1.7
|
yarn.lock
DELETED
|
@@ -1,4 +0,0 @@
|
|
| 1 |
-
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
| 2 |
-
# yarn lockfile v1
|
| 3 |
-
|
| 4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|