Skip to content

Commit

Permalink
added ngnix to the ai1899 stack. removed swarm support as there is no…
Browse files Browse the repository at this point in the history
…t way to test it yet
  • Loading branch information
Formartha committed Mar 3, 2024
1 parent c007838 commit 1cdb1cf
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 141 deletions.
134 changes: 0 additions & 134 deletions docker-compose-swarm.yaml

This file was deleted.

26 changes: 19 additions & 7 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ version: '3'
services:
ai:
image: "formartha/ai1899:latest"
ports:
- "5555:5555"
networks:
- int_network
depends_on:
Expand All @@ -29,7 +27,7 @@ services:
image: "ghcr.io/qdrant/qdrant/qdrant:v1.7.4"
networks:
- int_network
ports:
ports: # remove after https://github.com/qdrant/qdrant-web-ui/issues/94 is solved
- "6333:6333"
deploy:
resources:
Expand All @@ -40,8 +38,6 @@ services:
redis:
hostname: "redis"
image: "redis:7.2.4-alpine"
ports:
- "6379:6379"
networks:
- int_network
deploy:
Expand All @@ -54,8 +50,6 @@ services:
image: "rediscommander/redis-commander:latest"
environment:
- REDIS_HOSTS=local:redis:6379
ports:
- "8081:8081"
networks:
- int_network
deploy:
Expand Down Expand Up @@ -85,6 +79,24 @@ services:
memory: 500M # Recommended: 4GB RAM
command: celery --app=tasks worker --loglevel=INFO --pool=solo

nginx:
image: nginx:latest
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
ports:
- "80:80"
networks:
- int_network
depends_on:
- ai
- qdrant-container
- redis
deploy:
resources:
limits:
cpus: "0.5" # Recommended: 1 CPUs
memory: 500M # Recommended: 4GB RAM

networks:
int_network:
driver: bridge
Expand Down
24 changes: 24 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
events {}

http {
server {
listen 80;

location /ai/ {
proxy_pass http://ai:5555/;
}

# There is a known issue with qdrant behind reverse proxy, pending for solution: https://github.com/qdrant/qdrant-web-ui/issues/94
#location /qdrant/ {
# proxy_pass http://qdrant-container:6333/dashboard/;
#}

location /redis-commander/ {
proxy_pass http://redis-commander:8081/;
}

location / {
return 404;
}
}
}

0 comments on commit 1cdb1cf

Please sign in to comment.