NGINX¶
This page documents the Docker configuration and deployment setup for the {{SERVICE_NAME}} service.
Overview¶
Brief description of what this service does and its role in the stack.
Deployment Configuration¶
Below is the compose.yml used to deploy this service:
services:
nginx:
image: nginx:alpine
container_name: nginx
restart: unless-stopped
volumes:
- /srv/docker/nginx/www:/usr/share/nginx/html:ro
- /srv/docker/nginx/conf:/etc/nginx/conf.d:ro
- /srv/docker/nginx/www/downloads/libs:/usr/share/nginx/downloads/libs
networks:
- proxy
labels:
- "traefik.enable=true"
# Router
- "traefik.http.routers.web.rule=Host(`nosys.org`)"
- "traefik.http.routers.web.entrypoints=websecure"
- "traefik.http.routers.web.tls.certresolver=letsencrypt"
# Service
- "traefik.http.services.web.loadbalancer.server.port=80"
networks:
proxy:
external: true
Environment Variables¶
List and explain any required environment variables for this service.
| Variable | Description | Required | Default |
|---|---|---|---|
| EXAMPLE_VAR | Example description | Yes | value |
Volumes¶
Document any mounted volumes and their purpose.
| Path | Purpose |
|---|---|
/data |
Persistent application data |
Networking¶
Describe exposed ports, internal networking, or reverse proxy usage.
| Port | Purpose |
|---|---|
80 |
HTTP traffic |
443 |
HTTPS traffic |
Service Dependencies¶
List any dependent services required for this container.
- Database
- Redis
- Reverse proxy
Additional Configuration¶
Include any optional or service-specific configuration files here.
Example Configuration File¶
server {
listen 80;
server_name _;
location /downloads/libs/ {
alias /usr/share/nginx/downloads/libs/;
autoindex on;
add_header Content-Disposition "attachment";
}
location / {
root /usr/share/nginx/html;
index index.html;
try_files $uri /index.html;
}
}
Management Commands¶
Start¶
docker compose up -d
Stop¶
docker compose down
Restart¶
docker compose restart
View Logs¶
docker compose logs -f nginx
Notes¶
Add any operational notes, troubleshooting tips, or caveats here.