adjusting compose file

This commit is contained in:
2025-09-08 17:32:11 +02:00
parent 56315fe147
commit 8a40e7115f
2 changed files with 32 additions and 4 deletions

View File

@@ -256,12 +256,14 @@ services:
# Exclude from health checks if needed
exclude_from_hc: false
# Labels for Coolify management
# Labels for Coolify management and Traefik routing
labels:
- coolify.managed=true
- traefik.enable=true
- "traefik.http.routers.jobs-app.rule=Host(`${SERVICE_FQDN_JOBS_APP:-localhost}`)"
- traefik.http.routers.jobs-app.entryPoints=http
- traefik.http.routers.jobs-app.entryPoints=https
- "traefik.http.routers.jobs-app.middlewares=https-redirect"
- "traefik.http.middlewares.https-redirect.redirectscheme.scheme=https"
```
#### 5. Database Configuration for Coolify
@@ -322,7 +324,9 @@ services:
- coolify.managed=true
- traefik.enable=true
- "traefik.http.routers.jobs-app.rule=Host(`${SERVICE_FQDN_JOBS_APP:-localhost}`)"
- traefik.http.routers.jobs-app.entryPoints=http
- traefik.http.routers.jobs-app.entryPoints=https
- "traefik.http.routers.jobs-app.middlewares=https-redirect"
- "traefik.http.middlewares.https-redirect.redirectscheme.scheme=https"
networks:
- jobs-network
restart: unless-stopped
@@ -378,4 +382,26 @@ networks:
4. **Storage Permissions**: Verify volume permissions are correct
5. **FQDN Configuration**: Check that the generated FQDN is accessible
#### Common Coolify Errors
**Error: "The scheme `domain.sslip.io` isn't valid. It should be either `http`, `https`"**
- **Cause**: Incorrect Traefik router configuration using full URLs instead of hostnames
- **Solution**: Use `SERVICE_FQDN_*` variables (which contain just the domain) in `Host()` rules, not `SERVICE_URL_*` variables
**Example**:
```yaml
# Correct
- "traefik.http.routers.app.rule=Host(`${SERVICE_FQDN_APP:-localhost}`)"
# Incorrect
- "traefik.http.routers.app.rule=Host(`${SERVICE_URL_APP:-localhost}`)"
```
##### Container fails to start with permission denied
- **Cause**: Volume mount permissions in Coolify environment
- **Solution**: Ensure `is_directory: true` is set for bind mounts that need directory creation
For more information, visit the [Coolify Docker Compose documentation](https://coolify.io/docs/knowledge-base/docker/compose).