opnform-host-nginx/RESTART_INSTRUCTIONS.md

44 lines
1.7 KiB
Markdown
Raw Permalink Normal View History

# 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:
1. **opnform-db** - Wait until healthy
2. **opnform-redis** - Wait until healthy
3. **opnform-api** - Wait until it shows as running
4. **opnform-api-nginx** - This should now start successfully
5. **opnform-api-worker** - Start this
6. **opnform-api-scheduler** - Start this
7. **opnform-client** - Start this last
## 3. Verify Services
After all containers are running:
- Check that `opnform-api-nginx` is healthy (not "starting")
- Access the UI at: http://YOUR-SERVER-IP:7655
- API should be available at: http://YOUR-SERVER-IP:7654
## What Changed
1. **Fixed PHP-FPM health check** - Changed from running artisan command to checking if php-fpm process exists
2. **Added restart policies** - Containers will restart unless manually stopped
3. **Changed port bindings** - From 127.0.0.1 (localhost only) to 0.0.0.0 (accessible from any IP)
4. **Extended start period** - Gave API container more time to start before health checks
## Troubleshooting
If api-nginx is still unhealthy:
1. Check logs of opnform-api container
2. Verify PHP-FPM is running: Look for php-fpm processes in the api container
3. 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