chore: update Docker deployment guide and configuration
Build And Push Image / docker (push) Successful in 2m40s
Details
Build And Push Image / docker (push) Successful in 2m40s
Details
This commit is contained in:
parent
228968bad1
commit
378e730c68
|
|
@ -220,8 +220,38 @@ sudo mkdir -p /opt/monacousa-portal-staging
|
|||
sudo chown -R deploy:deploy /opt/monacousa-portal*
|
||||
|
||||
# Create data directories
|
||||
sudo -u deploy mkdir -p /opt/monacousa-portal/{data,logs,nginx}
|
||||
sudo -u deploy mkdir -p /opt/monacousa-portal-staging/{data,logs,nginx}
|
||||
sudo -u deploy mkdir -p /opt/monacousa-portal/{data,logs}
|
||||
sudo -u deploy mkdir -p /opt/monacousa-portal-staging/{data,logs}
|
||||
```
|
||||
|
||||
### Server-Level Nginx Configuration
|
||||
|
||||
The included `nginx-portal.conf` file is a reference configuration for your server-level nginx setup. Configure nginx on your server to:
|
||||
|
||||
- **Reverse proxy** to the Docker container on port 6060
|
||||
- **SSL termination** with your certificates
|
||||
- **Security headers** and optimizations
|
||||
- **Static file serving** if needed
|
||||
|
||||
Example server nginx configuration:
|
||||
```nginx
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
server_name portal.monacousa.org;
|
||||
|
||||
# SSL configuration
|
||||
ssl_certificate /path/to/your/cert.pem;
|
||||
ssl_certificate_key /path/to/your/key.pem;
|
||||
|
||||
# Proxy to Docker container
|
||||
location / {
|
||||
proxy_pass http://localhost:6060;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## 🔍 Health Checks & Monitoring
|
||||
|
|
|
|||
|
|
@ -67,22 +67,6 @@ services:
|
|||
reservations:
|
||||
memory: 256M
|
||||
|
||||
# Optional: Nginx reverse proxy
|
||||
nginx:
|
||||
image: nginx:alpine
|
||||
container_name: monacousa-nginx
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
volumes:
|
||||
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
||||
- ./nginx/ssl:/etc/nginx/ssl:ro
|
||||
- ./logs/nginx:/var/log/nginx
|
||||
depends_on:
|
||||
- monacousa-portal
|
||||
networks:
|
||||
- monacousa-network
|
||||
|
||||
networks:
|
||||
monacousa-network:
|
||||
|
|
|
|||
Loading…
Reference in New Issue