1.7 KiB
1.7 KiB
How to Restart OpnForm Containers
Since you're using a web-based Docker management interface, follow these steps:
1. Stop All Containers
In your Docker management interface:
- Select all OpnForm containers
- Click "Stop" or use the stop button
- Wait for all containers to stop
2. Start Containers in Correct Order
Start the containers in this order:
- opnform-db - Wait until healthy
- opnform-redis - Wait until healthy
- opnform-api - Wait until it shows as running
- opnform-api-nginx - This should now start successfully
- opnform-api-worker - Start this
- opnform-api-scheduler - Start this
- opnform-client - Start this last
3. Verify Services
After all containers are running:
- Check that
opnform-api-nginxis healthy (not "starting") - Access the UI at: http://YOUR-SERVER-IP:7655
- API should be available at: http://YOUR-SERVER-IP:7654
What Changed
- Fixed PHP-FPM health check - Changed from running artisan command to checking if php-fpm process exists
- Added restart policies - Containers will restart unless manually stopped
- Changed port bindings - From 127.0.0.1 (localhost only) to 0.0.0.0 (accessible from any IP)
- Extended start period - Gave API container more time to start before health checks
Troubleshooting
If api-nginx is still unhealthy:
- Check logs of opnform-api container
- Verify PHP-FPM is running: Look for php-fpm processes in the api container
- Check api-nginx logs for connection errors
Security Note
The services are now exposed on all network interfaces. For production:
- Use a firewall to restrict access
- Configure your host nginx with SSL
- Or revert to localhost binding after testing