Docker deployment Realised

This commit is contained in:
Josako
2024-06-26 12:02:14 +02:00
parent 348bdf2c15
commit 7a1b51dd0c
2494 changed files with 7329 additions and 172135 deletions

BIN
docker/.DS_Store vendored Normal file

Binary file not shown.

1
docker/.env Normal file
View File

@@ -0,0 +1 @@
COMPOSE_PROJECT_NAME=eveai_development

171
docker/compose.yaml Normal file
View File

@@ -0,0 +1,171 @@
# Comments are provided throughout this file to help you get started.
# If you need more help, visit the Docker Compose reference guide at
# https://docs.docker.com/go/compose-spec-reference/
# Here the instructions define your application as a service called "server".
# This service is built from the Dockerfile in the current directory.
# You can add other services your application may depend on here, such as a
# database or a cache. For examples, see the Awesome Compose repository:
# https://github.com/docker/awesome-compose
services:
nginx:
image: nginx:latest
ports:
- 80:80
- 8080:8080
volumes:
- ../nginx:/etc/nginx
- ../nginx/sites-enabled:/etc/nginx/sites-enabled
- ../nginx/static:/etc/nginx/static
- ../nginx/public:/etc/nginx/public
- ./logs/nginx:/var/log/nginx
depends_on:
- eveai_app
- eveai_chat
eveai_app:
build:
context: ..
dockerfile: ./docker/eveai_app/Dockerfile
ports:
- 5001:5001
environment:
- FLASK_ENV=development
- FLASK_DEBUG=1
volumes:
- ../eveai_app:/app/eveai_app
- ../common:/app/common
- ../config:/app/config
- ../migrations:/app/migrations
- ../scripts:/app/scripts
- ./logs:/app/logs
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5001/health"]
interval: 10s
timeout: 5s
retries: 5
command: ["sh", "-c", "scripts/start_eveai_app.sh"]
eveai_workers:
build:
context: ..
dockerfile: ./docker/eveai_workers/Dockerfile
# ports:
# - 5001:5001
environment:
- FLASK_ENV=development
- FLASK_DEBUG=1
volumes:
- ../eveai_workers:/app/eveai_workers
- ../common:/app/common
- ../config:/app/config
- ../scripts:/app/scripts
- ./logs:/app/logs
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
# healthcheck:
# test: [ "CMD", "curl", "-f", "http://localhost:5001/health" ]
# interval: 10s
# timeout: 5s
# retries: 5
command: [ "sh", "-c", "scripts/start_eveai_workers.sh" ]
eveai_chat:
build:
context: ..
dockerfile: ./docker/eveai_chat/Dockerfile
ports:
- 5002:5002
environment:
- FLASK_ENV=development
- FLASK_DEBUG=1
volumes:
- ../eveai_chat:/app/eveai_chat
- ../common:/app/common
- ../config:/app/config
- ../scripts:/app/scripts
- ./logs:/app/logs
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:5002/health" ] # Adjust based on your health endpoint
interval: 10s
timeout: 5s
retries: 5
eveai_chat_workers:
build:
context: ..
dockerfile: ./docker/eveai_chat_workers/Dockerfile
# ports:
# - 5001:5001
environment:
- FLASK_ENV=development
- FLASK_DEBUG=1
volumes:
- ../eveai_chat_workers:/app/eveai_chat_workers
- ../common:/app/common
- ../config:/app/config
- ../scripts:/app/scripts
- ./logs:/app/logs
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
# healthcheck:
# test: [ "CMD", "curl", "-f", "http://localhost:5001/health" ]
# interval: 10s
# timeout: 5s
# retries: 5
command: [ "sh", "-c", "scripts/start_eveai_chat_workers.sh" ]
db:
hostname: db
image: ankane/pgvector
ports:
- 5432:5432
restart: always
environment:
- POSTGRES_DB=eveai
- POSTGRES_USER=luke
- POSTGRES_PASSWORD=Skywalker!
volumes:
- ./db/postgresql:/var/lib/postgresql/data
- ./db/init.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test: [ "CMD-SHELL", "pg_isready -d eveai -U luke" ]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:7.2.5
restart: always
expose:
- 6379
volumes:
- ./db/redis:/data
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 10s
timeout: 5s
retries: 5
volumes:
db-data:
redis-data:
#secrets:
# db-password:
# file: ./db/password.txt

BIN
docker/db/.DS_Store vendored Normal file

Binary file not shown.

4
docker/db/init.sql Normal file
View File

@@ -0,0 +1,4 @@
-- Initialize the eveai database and enable the pgvector extension
CREATE EXTENSION IF NOT EXISTS vector;
-- You can add other initialization SQL commands here if needed

1
docker/db/password.txt Normal file
View File

@@ -0,0 +1 @@
Skywalker!

BIN
docker/db/postgresql/.DS_Store vendored Normal file

Binary file not shown.

View File

@@ -0,0 +1 @@
15

BIN
docker/db/postgresql/base/.DS_Store vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

Binary file not shown.

View File

View File

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

Binary file not shown.

View File

View File

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More