Skip to content

Commit

Permalink
Added docs functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
Vasilije1990 committed Nov 7, 2023
1 parent 6a13072 commit 8d1038a
Show file tree
Hide file tree
Showing 4 changed files with 424 additions and 0 deletions.
10 changes: 10 additions & 0 deletions level_4/.env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
OPENAI_API_KEY=sk
WEAVIATE_URL =
WEAVIATE_API_KEY =
ENVIRONMENT = docker
POSTGRES_USER = bla
POSTGRES_PASSWORD = bla
POSTGRES_DB = bubu
POSTGRES_HOST = localhost
POSTGRES_HOST_DOCKER = postgres
SEGMENT_KEY = Etl4WJwzOkeDPAjaOXOMgyU16hO7mV7B
51 changes: 51 additions & 0 deletions level_4/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@

FROM python:3.11

# Set build argument
ARG API_ENABLED

# Set environment variable based on the build argument
ENV API_ENABLED=${API_ENABLED} \
PIP_NO_CACHE_DIR=true
ENV PATH="${PATH}:/root/.poetry/bin"
RUN pip install poetry

WORKDIR /app
COPY pyproject.toml poetry.lock /app/

# Install the dependencies
RUN poetry config virtualenvs.create false && \
poetry install --no-root --no-dev

RUN apt-get update -q && \
apt-get install -y -q \
gcc \
python3-dev \
curl \
zip \
jq \
netcat-traditional && \
pip install poetry && \
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
unzip -qq awscliv2.zip && \
./aws/install && \
apt-get clean && \
rm -rf \
awscliv2.zip \
/var/lib/apt/lists/* \
/tmp/* \
/var/tmp/*



#RUN playwright install
#RUN playwright install-deps

WORKDIR /app
COPY . /app
COPY scripts/ /app
COPY entrypoint.sh /app/entrypoint.sh
COPY scripts/create_database.py /app/create_database.py
RUN chmod +x /app/entrypoint.sh

ENTRYPOINT ["/app/entrypoint.sh"]
77 changes: 77 additions & 0 deletions level_4/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
version: "3.9"

services:
neo4j:
image: neo4j:latest
container_name: neo4j
ports:
- "7474:7474"
- "7687:7687"
environment:
- NEO4J_AUTH=neo4j/pleaseletmein
- NEO4J_PLUGINS=["apoc"]
networks:
- promethai_mem_backend

# promethai_mem:
# networks:
# - promethai_mem_backend
# build:
# context: ./
# volumes:
# - "./:/app"
# - ./.data:/app/.data
#
# environment:
# - HOST=0.0.0.0
# profiles: ["exclude-from-up"]
# ports:
# - 8000:8000
# - 443:443
# - 80:80
# depends_on:
# - postgres
# deploy:
# resources:
# limits:
# cpus: "4.0"
# memory: 8GB


postgres:
image: postgres
container_name: postgres
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
- POSTGRES_USER=bla
- POSTGRES_PASSWORD=bla
- POSTGRES_DB=bubu
networks:
- promethai_mem_backend
ports:
- "5432:5432"

# superset:
# platform: linux/amd64
# build:
# context: ./superset
# dockerfile: Dockerfile
# container_name: superset
# environment:
# - ADMIN_USERNAME=admin
# - [email protected]
# - ADMIN_PASSWORD=admin
# - POSTGRES_USER=bla
# - POSTGRES_PASSWORD=bla
# - POSTGRES_DB=bubu
# networks:
# - promethai_mem_backend
# ports:
# - '8088:8088'
# depends_on:
# - postgres

networks:
promethai_mem_backend:
name: promethai_mem_backend

Loading

0 comments on commit 8d1038a

Please sign in to comment.