Skip to main content

bar assistant

vor dem Ausrollen müssen noch folgende Volumes erstellt werde

bar-assistant bar-assistant-redis bar-assistant-meilisearch

sowie folgendes Netzwerk bar-assistant

version: "3"

services:
  meilisearch:
    container_name: meilisearch
    hostname: meilisearch
    image: getmeili/meilisearch:v1.1
    restart: unless-stopped
    networks:
      - bar-assistant
    volumes:
      -  bar-assistant-meilisearch:/meili_data
    environment:
      - MEILI_MASTER_KEY=super-secret-password				# password anpassen
      - MEILI_ENV=production

  redis:
    container_name: redis
    hostname: redis
    image: redis
    restart: unless-stopped
    networks:
      - bar-assistant
    volumes:
      - bar-assistant-redis:/data
    environment:
      - ALLOW_EMPTY_PASSWORD=yes

  bar-assistant:
    container_name: bar-assistant
    hostname: bar-assistant
    image: barassistant/server:latest
    restart: unless-stopped
    networks:
      - bar-assistant
    volumes:
      - bar-assistant:/var/www/cocktails/storage/bar-assistant
    depends_on:
      - meilisearch
      - redis
    environment:
      - APP_URL=https://minibar.your-url.de/bar				# url anpassen
      - LOG_CHANNEL=stderr
      - MEILISEARCH_KEY=super-secret-password				# password anpassen
      - MEILISEARCH_HOST=http://meilisearch:7700
      - REDIS_HOST=redis
      - ALLOW_REGISTRATION=true

  salt-rim:
    container_name: salt-rim
    hostname: salt-rim
    image: barassistant/salt-rim:latest
    restart: unless-stopped
    networks:
      - bar-assistant
    depends_on:
      - bar-assistant
    environment:
      - API_URL=https://minibar.your-url.de/bar				# url anpassen
      - MEILISEARCH_URL=https://minibar.your-url.de/search 	# url anpassen
      - DEFAULT_LOCALE=en-US
#      - BAR_NAME=
#      - DESCRIPTION=

  webserver:
    container_name: webserver
    hostname: webserver
    image: nginx:alpine
    restart: unless-stopped
    networks:
      - bar-assistant
    ports:
      - 3000:3000
    volumes:
      - /home/your-user-folder/bar-assistant/nginx.conf:/etc/nginx/conf.d/default.conf # pfad anpassen

networks:
  bar-assistant:
    external: true

volumes:
  bar-assistant:
    external: true
  bar-assistant-redis:
    external: true
  bar-assistant-meilisearch:
    external: true

/home/your-user-folder/bar-assistant/nginx.conf

server {
     listen 3000 default_server;
     listen [::]:3000 default_server;
     server_name _;

    location = /favicon.ico { access_log off; log_not_found off; }
    location = /robots.txt  { access_log off; log_not_found off; }

    client_max_body_size 100M;
    
    location /bar/ {
        proxy_pass http://bar-assistant:3000/;
    }
    
    location /search/ {
        proxy_pass http://meilisearch:7700/;
    }
    
    location / {
        proxy_pass http://salt-rim:8080/;
    }
}