diff --git a/backend/Containerfile b/backend/Containerfile new file mode 100644 index 0000000..305399c --- /dev/null +++ b/backend/Containerfile @@ -0,0 +1,16 @@ +FROM python:3.11-slim + +RUN apt-get update && apt-get install -y \ + gcc \ + && rm -rf /var/lib/apt/lists/* + +WORKDIR /app + +COPY requirements.txt /app/ +RUN pip install --no-cache-dir -r requirements.txt + +COPY . /app + +EXPOSE 8000 + +CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"] diff --git a/compose.yml b/compose.yml new file mode 100644 index 0000000..dff1745 --- /dev/null +++ b/compose.yml @@ -0,0 +1,41 @@ +version: '3.9' + +services: + frontend: + build: + context: ./frontend + dockerfile: Containerfile + ports: + - '8080:8000' # Map host port 3000 to container port 8000 (Deno app) + depends_on: + - backend + networks: + - app-network + + backend: + build: + context: ./backend + dockerfile: Containerfile + ports: + - '8000:8000' # Map host port 8000 to container port 8000 (FastAPI app) + depends_on: + - neo4j + environment: + - NEO4J_URI=bolt://neo4j:7687 + - NEO4J_USER=neo4j + - NEO4J_PASSWORD=neo4jpassword + networks: + - app-network + + neo4j: + image: neo4j:latest + ports: + - '7474:7474' # HTTP access + - '7687:7687' # Bolt access + environment: + - NEO4J_AUTH=neo4j/neo4jpassword + networks: + - app-network + +networks: + app-network: diff --git a/frontend/Containerfile b/frontend/Containerfile new file mode 100644 index 0000000..e212a3e --- /dev/null +++ b/frontend/Containerfile @@ -0,0 +1,9 @@ +FROM denoland/deno:alpine + +WORKDIR /app + +COPY . /app + +EXPOSE 8000 + +CMD ["run", "--allow-net", "--allow-read", "main.ts"]