diff --git a/docker-compose.demo.yml b/docker-compose.demo.yml new file mode 100644 index 0000000000000000000000000000000000000000..74fe8f9422c19a37e704563b968a3eaf25e30f67 --- /dev/null +++ b/docker-compose.demo.yml @@ -0,0 +1,56 @@ +services: + web: + build: . + command: gunicorn heyheyLibrary.wsgi:application --bind 0.0.0.0:8000 + environment: + - DJANGO_ALLOWED_HOSTS=librarydemo.rb9.xyz + - OPENSEARCH_USERNAME=admin + - OPENSEARCH_PASSWORD=VeryInsecurePassword1! + volumes: + - demo_static:/home/app/web/staticfiles + - demo_media:/home/app/web/mediafiles + - ./db.sqlite3:/home/app/web/db.sqlite3 + expose: + - 8000 + depends_on: + - opensearch + networks: + - librarydemo + + opensearch: + image: opensearchproject/opensearch:latest + ulimits: + memlock: + soft: -1 # Set memlock to unlimited (no soft or hard limit) + hard: -1 + nofile: + soft: 65536 # Maximum number of open files for the opensearch user - set to at least 65536 + hard: 65536 + volumes: + - demo_opensearch:/usr/share/opensearch/data # Creates volume called opensearch-data1 and mounts it to the container + expose: + - 9200 + - 9600 + networks: + - librarydemo + + nginx: + image: nginx:1.27 + volumes: + - ./nginx.conf:/etc/nginx/nginx.conf:ro + - demo_static:/home/app/web/staticfiles + - demo_media:/home/app/web/mediafiles + ports: + - 1337:80 + depends_on: + - web + networks: + - librarydemo + +volumes: + demo_static: + demo_media: + demo_opensearch: + +networks: + librarydemo: \ No newline at end of file