Server and Service Restart Guide using Portainer for Frappe Sites
Follow the steps below to restart the server and its respective services for Frappe sites through Portainer:
Step 1: Login to Portainer
- Open Portainer through your web browser.
- Log in using your provided credentials.
Step 2: Navigate to the Respective Node
- From the main dashboard, select the relevant node or environment where the container is hosted.
Step 3: Go to Containers
- On the sidebar, click on Containers to view the list of all containers on the node.
Step 4: Start the Specific Container
- Locate the container associated with your Frappe site.
- Select the container and click the Start button if the container is not already running.
Step 5: Connect to the Container Console
- Once the container has started, click on the container name.
- Select the Console option from the container menu.
- Open an interactive shell (usually
/bin/bash
).
Step 6: Switch User and Navigate to Frappe Bench
- Inside the console, execute the following commands to switch to the appropriate user and navigate to the Frappe Bench directory:
su - extension # Replace 'extension' with the respective user
cd frappe-bench
Step 7: Restart All Necessary Services
- Run the following loop command to restart all essential services:
services=(cron dbus fail2ban hwclock.sh mariadb nginx procps redis-server rsync nginx ssh supervisor unattended-upgrades x11-common)
for service in "${services[@]}"
do
sudo service "$service" start
done
Verification
- Ensure all services are up and running without errors.
- Verify the Frappe sites are accessible and functioning correctly.