├── .env ├── README.md ├── docker-compose.yml └── nginx.conf /.env: -------------------------------------------------------------------------------- 1 | # Your Meilisearch master key 2 | # Find out more here: https://docs.meilisearch.com/learn/getting_started/quick_start.html#securing-meilisearch 3 | MEILI_MASTER_KEY=masterKey-make-it-long-for-security 4 | 5 | # Base URL of the application 6 | # You should update this value to the URL you plan to use (ex: http://192.168.100.100, https://my-personal-bar.com) 7 | # The value MUST be without trailing slash 8 | BASE_URL=http://localhost:3000 9 | 10 | # Meilisearch server instance URL, change if you are using different host from base url, otherwise leave as default 11 | MEILISEARCH_URL=${BASE_URL}/search 12 | 13 | # Bar Assistant server instance URL, change if you are using different host from base url, otherwise leave as default 14 | API_URL=${BASE_URL}/bar -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Bar Assistant Docker Compose Stack 2 | 3 | Fast start with the bar assistant server, search and client. 4 | 5 | You can checkout [the official documentation here](https://bar-assistant.github.io/docs). 6 | 7 | ## Installation 8 | 9 | 1. Clone the repository 10 | 2. Update `.env` settings 11 | 3. Run `docker compose up -d` 12 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | volumes: 2 | bar_data: 3 | meilisearch_data: 4 | 5 | services: 6 | meilisearch: 7 | image: getmeili/meilisearch:v1.12 # Never use latest tag 8 | environment: 9 | - MEILI_NO_ANALYTICS=true 10 | - MEILI_MASTER_KEY=$MEILI_MASTER_KEY 11 | - MEILI_ENV=production 12 | restart: unless-stopped 13 | volumes: 14 | - meilisearch_data:/meili_data 15 | 16 | # Optional, but recommended 17 | redis: 18 | image: redis 19 | environment: 20 | - ALLOW_EMPTY_PASSWORD=yes 21 | restart: unless-stopped 22 | 23 | bar-assistant: 24 | image: barassistant/server:v5 25 | depends_on: 26 | - meilisearch 27 | - redis # Remove if not using redis 28 | environment: 29 | - APP_URL=$API_URL 30 | - MEILISEARCH_KEY=$MEILI_MASTER_KEY 31 | - MEILISEARCH_HOST=http://meilisearch:7700 # This needs to be host that can be resolved from inside the container. 32 | - REDIS_HOST=redis # Remove if not using redis 33 | - CACHE_DRIVER=redis # Change to "file" if not using redis 34 | - SESSION_DRIVER=redis # Change to "file" if not using redis 35 | - ALLOW_REGISTRATION=true 36 | restart: unless-stopped 37 | volumes: 38 | - bar_data:/var/www/cocktails/storage/bar-assistant 39 | 40 | salt-rim: 41 | image: barassistant/salt-rim:v4 42 | depends_on: 43 | - bar-assistant 44 | environment: 45 | - API_URL=$API_URL 46 | - MEILISEARCH_URL=$MEILISEARCH_URL 47 | restart: unless-stopped 48 | 49 | # Reverse proxy all web services 50 | # You can remove this service if you already have a reverse proxy somewhere in your stack, 51 | # but you will need to manually setup the configuration 52 | # Check included nginx.conf for reference 53 | webserver: 54 | image: nginx:alpine 55 | restart: unless-stopped 56 | depends_on: 57 | - bar-assistant 58 | - salt-rim 59 | - meilisearch 60 | ports: 61 | - 3000:3000 62 | volumes: 63 | - ./nginx.conf:/etc/nginx/conf.d/default.conf 64 | -------------------------------------------------------------------------------- /nginx.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 3000 default_server; 3 | listen [::]:3000 default_server; 4 | server_name _; 5 | 6 | location = /favicon.ico { access_log off; log_not_found off; } 7 | location = /robots.txt { access_log off; log_not_found off; } 8 | 9 | client_max_body_size 100M; 10 | 11 | location /bar/ { 12 | proxy_pass http://bar-assistant:8080/; 13 | } 14 | 15 | location /search/ { 16 | proxy_pass http://meilisearch:7700/; 17 | } 18 | 19 | location / { 20 | proxy_pass http://salt-rim:8080/; 21 | } 22 | } --------------------------------------------------------------------------------