التشغيل باستخدام docker-compose
يوضح هذا القسم كيفية تثبيت خدمة Nutrix باستخدام docker-compose.
TIP
على Windows تأكد من تثبيت WSL2 قبل المتابعة.
INFO
تأكد من تثبيت git و docker و docker-compose
1. استنسخ مستودع pos وقم بتشغيل docker compose
git clone https://github.com/nutrixpos/pos.git
cd pos
docker-compose up --build -d2. تكوين البدء التلقائي
INFO
For Windows users !
Enable systemd in wsl config
vim /etc/wsl.conf[boot]
systemd=trueYou will then need to close the Linux distribution. You can use the command wsl.exe --shutdown in PowerShell to restart all WSL instances.
Once your Linux distribution restarts, systemd will be running. You can confirm using the command: systemctl list-unit-files --type=service, which will show the status of any services associated with your Linux distribution.
for more info refer to WSL Systemd
Create systemd unit files
sudo nano /etc/systemd/system/nutrix.service[Unit]
Description=My Docker Compose Service
Requires=docker.service
After=docker.service
[Service]
Type=oneshot
RemainAfterExit=yes
WorkingDirectory=/path/to/your/pos_repo
ExecStartPre=/usr/bin/docker-compose down
ExecStart=/usr/bin/docker-compose up -d
ExecStop=/usr/bin/docker-compose down
Restart=no
[Install]
WantedBy=multi-user.targetTIP
Make sure you change /path/to/your/pos_repo in the above file to the pos repo path on your machine
Enable and start the service
sudo systemctl enable nutrix.service
sudo systemctl start nutrix.service3. افتح وحدة تحكم nutrix
افتح وحدة تحكم nutrix على http://localhost:3000

