laitimes

See, here are 300 Slavic cocktail manuals, and a bar management system is deployed using NAS

author:What is worth buying

This content comes from @What's worth buyingAPP, and the views only represent the author's own |Author: Cute little cherry

Hello everyone, this is Cherry, who loves tossing, picking up garbage, playing digital, and is keen to share NAS and docker play experience~

Preface

Do you have a dream of opening a bar?

When Cherry was a child, relatives at home used to run a bar for a while, and at that time, every day after school, they would go to the bar for a drink, watch the big brothers and sisters dance in the bar, listen to the music of the bar, and always unconsciously think that it would be nice if I could open a bar. Later, after abandoning these unrealistic ideas, I became obsessed with the profession of bartending because I felt handsome enough.

Of course, none of this came to fruition, after all, Cherry doesn't drink~

The project I introduced to you today is amazing, the bar management project developed by the Slavs (yes, it's not Maozi, bad reviews), the project integrates 303 chickens collected by the author! Tail! The > preparation method gives a detailed plan from the appearance, composition, sequence, ratio, etc., and it can be said that you can adjust the series with your hands.

Project address: https://github.com/karlomikus/bar-assistant

Project characteristics

- Includes more than 300 cocktail recipes with detailed information, including more than 150 basic ingredients.

- Add and manage multiple bars and bar members, using user roles for fine-grained user control

- Endpoints for managing and filtering ingredients and cocktails

- Filter recipes by ABV, basic ingredients, labels, etc

- Filter recipes based on whether you have the right ingredients or not

- Detailed cocktail and ingredient information

- Support for assigning multiple images to resources and image sorting

- Generate shopping lists based on ingredients that are missing from inventory

- Automatically index data with Meilisearch

- Support for custom cocktail toppings substitutes

- Support glass type, utensils, labels, ingredient categories, etc

- Import cocktail recipes via URL, JSON, YAML, or custom collections

- Support cocktail rating

- Create user-specific cocktail collections for easy reference and sharing

- Support cocktails and ingredient annotations

- Support sharing recipes via public links, custom recipe images, and printing

- Create a public bar menu

- Manage custom API personal access tokens with custom permissions set by users

- Detailed statistics on recipes and user tastes

System deployment

This project uses docker-compose and SSH deployment, which requires certain technical skills.

1. Download the code

Access NAS through SSH tools such as FinalShell, take /volume1/docker/bar as an example, and then enter the following command to generate three files:

mkdir -p /volume1/docker/bar && cd /volume1/docker/bar

touch {nginx.conf,.env,docker-compose.yml}

See, here are 300 Slavic cocktail manuals, and a bar management system is deployed using NAS

2. Modify the code

Copy the following code into the nginx.conf file and it will be completely unchanged

server {

list 3000 default_server;

list [::]: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/;

}

}

Copy the following code into an .env file and change the second line

MEILI_MASTER_KEY=masterKey-make-it-long-for-security

BASE_URL=http://localhost:3000 #这里要改为实际访问的地址, such as http://192.168.1.1:1234

MEILISEARCH_URL=${BASE_URL}/search

API_URL=${BASE_URL}/bar

Copy the following code into the docker-compose.yml file and only need to change the port on the 7th line from the bottom

version: "3"

services:

meilisearch:

image: getmeili/meilisearch:v1.4 #

environment:

- MEILI_MASTER_KEY=$MEILI_MASTER_KEY

- MEILI_ENV=production

restart: unless-stopped

healthcheck:

test: ["CMD", "curl", "-f", "http://localhost:7700"]

interval: 10s

timeout: 5s

retries: 5

volumes:

- meilisearch_data:/meili_data

redis:

image: redis

environment:

- ALLOW_EMPTY_PASSWORD=yes

restart: unless-stopped

healthcheck:

test: ["CMD", "redis-cli", "ping"]

interval: 1s

timeout: 3s

retries: 30

bar-assistant:

image: barassistant/server:v3

depends_on:

meilisearch:

condition: service_healthy

redis:

condition: service_healthy

environment:

# - PUID=1000 # Optional

# - PGID=1000 # Optional

- APP_URL=$API_URL

- LOG_CHANNEL=stderr #

- MEILISEARCH_KEY=$MEILI_MASTER_KEY

- MEILISEARCH_HOST=http://meilisearch:7700 #

- REDIS_HOST=redis #

- ALLOW_REGISTRATION=true # This is changed to false to disable user registration

restart: unless-stopped

healthcheck:

test: ["CMD", "curl", "-f", "http://localhost:3000"]

interval: 10s

timeout: 5s

retries: 5

volumes:

- bar_data:/var/www/cocktails/storage/bar-assistant

salt-rim:

image: barassistant/salt-rim:v2

depends_on:

bar-assistant:

condition: service_healthy

environment:

- API_URL=$API_URL

- MEILISEARCH_URL=$MEILISEARCH_URL

- BAR_NAME=$BAR_NAME

- DESCRIPTION=$BAR_DESCRIPTION

- DEFAULT_LOCALE=en-US

restart: unless-stopped

healthcheck:

test: ["CMD", "curl", "-f", "http://localhost:8080"]

interval: 10s

timeout: 5s

retries: 5

web server:

image: nginx:alpine

restart: unless-stopped

depends_on:

bar-assistant:

condition: service_healthy

salt-rim:

condition: service_healthy

meilisearch:

condition: service_healthy

ports:

- 1234:3000 # This is the only thing that needs to be changed, and here is how many ports are in .env

volumes:

- ./nginx.conf:/etc/nginx/conf.d/default.conf #

volumes:

bar_data:

meilisearch_data:

3. Start the project

On the SSH page, enter the following commands:

docker-compose up -d

System use

1. Register as an administrator and log in

If the installation is successful, you can see the version number in the code below

See, here are 300 Slavic cocktail manuals, and a bar management system is deployed using NAS

Second, how many stores should we open to manage the bar?

Let's build a new bar and fulfill your dreams! Click Create Bar in the upper right corner

See, here are 300 Slavic cocktail manuals, and a bar management system is deployed using NAS

Fill in the bar name, introduction, description and other information to save, and there is only one name for the required items

See, here are 300 Slavic cocktail manuals, and a bar management system is deployed using NAS

In addition to creating new bars, we can also join other people's bars with an invitation code. Ask other bar owners to click on the [Toggle invite code] under the bar, and then we can fill in the "Join a bar" field to join.

See, here are 300 Slavic cocktail manuals, and a bar management system is deployed using NAS

3. The bar package is here, with 300+ bartending recipes

Let's take a look at how many kinds of bars there are, and there are 303 kinds of bars, all of which are served with food, and they can be used as soon as they are used. If that's not enough, we can also customize the cocktail set by adding proportions and processes.

See, here are 300 Slavic cocktail manuals, and a bar management system is deployed using NAS

Here is our bar concoction homepage, where you can see all the recipes, ingredients, and lists

See, here are 300 Slavic cocktail manuals, and a bar management system is deployed using NAS

On the left, we click on a menu to go in.,Look at this picture.,Look at this ratio.,Look at this operation order.,Absolutely.。 My brain has learned!

See, here are 300 Slavic cocktail manuals, and a bar management system is deployed using NAS
See, here are 300 Slavic cocktail manuals, and a bar management system is deployed using NAS

Fourth, the management of bar raw materials, import and export are indispensable

In [Ingredients], we can view and maintain all the raw materials, and we can also manage and print the purchase list.

See, here are 300 Slavic cocktail manuals, and a bar management system is deployed using NAS

Fifth, the bar menu is generated with one click, and the style is full

Compared with clicking on the QR code to place an order, the bar can not be happy with a whole set of bars, get an electronic screen, update the menu at any time, and pull the style. We can generate single or multiple cocktail packages in the menu bar and set the price.

See, here are 300 Slavic cocktail manuals, and a bar management system is deployed using NAS

Through the QR code or URL, you can intuitively display all the combined prices.

See, here are 300 Slavic cocktail manuals, and a bar management system is deployed using NAS

My NAS recommendation

Here's a quick look at some of the NAS that Cherry uses on a daily basis and why you chose them.

The core device is the Synology DS920

This is Cherry's first NAS,It's been in service for many years,Classic J4125cpu+24G memory,With 517 to achieve 9 18T disks stuffed,Mainly used to play PT,Daily use of docker and personal data,Basically stored here,Therefore, it is also a device with the deepest feelings of Cherry,But the performance bottleneck of J4125 is here,There are more cpus in the container 90% hovering all year round,It is particularly inconvenient when deploying new projects。

Of course, for the students who are getting started, the 920 is not good in terms of price or performance, you can try the 224+ with 2 bays, and I also look forward to the new NAS coming out this year.

二代目核心设备——威联通QNAP TS-464C2

Because of the long service time of the Synology 920, Cherry bought an N5105 soft router and then looked at the QNAP TS-464C2 with the N5095 of the same period.

A sharp weapon for family members - Greenlink DX4600pro

In the process of using it by family members, the operation is simpler and the private cloud for the masses is more extensive. It is very convenient for parents to upload and back up some teaching and research materials and photos directly through the APP, and at the same time, through the built-in audiobook APP, parents can also listen to novels and the like in their spare time.

生产NAS——自建Unraid

Back to the project production, considering that in the process of project deployment, there are often problems such as startup errors, container exceptions, version iterations, etc., which all require powerful CPU and multi-threading to solve, so I used dual-way foreign garbage to build a UNRAID for production environment use, which is also the main machine of my project deployment.

See, here are 300 Slavic cocktail manuals, and a bar management system is deployed using NAS
See, here are 300 Slavic cocktail manuals, and a bar management system is deployed using NAS

Welcome friends to discuss and leave a message in the comment area. I will regularly update and pay attention to the use of NAS, open source software and Docker software, games and life-related content, if you like it, please follow, like, leave a message to support.

This article is included in the "Quality Content Incentive Program - Weekly Selection" >>> click to learn more about the program

The author declares that there is no interest in this article, and friends are welcome to communicate rationally and discuss harmoniously~

See, here are 300 Slavic cocktail manuals, and a bar management system is deployed using NAS

Read on