create podcast error in production using docker
Describe the bug
I tried to create a podcast in production and it raise an error
Steps to reproduce
- Create a docker-compose.yml with this configuration
version: "3.7"
services:
app:
image: castopod/app:latest
container_name: "castopod-app"
volumes:
- castopod-media:/opt/castopod/public/media
environment:
MYSQL_DATABASE: castopod
MYSQL_USER: castopod
MYSQL_PASSWORD: mypassword
CP_BASEURL: "http://podcast.example.com"
CP_ANALYTICS_SALT: mypassword
CP_CACHE_HANDLER: redis
CP_REDIS_HOST: redis
CP_DISABLE_HTTPS: 1
networks:
- castopod-app
- castopod-db
restart: unless-stopped
web-server:
image: castopod/web-server:latest
container_name: "castopod-web-server"
volumes:
- castopod-media:/var/www/html/media
networks:
- castopod-app
ports:
- 8080:80
restart: unless-stopped
mariadb:
image: mariadb:10.5
container_name: "castopod-mariadb"
networks:
- castopod-db
volumes:
- castopod-db:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: mypassword
MYSQL_DATABASE: castopod
MYSQL_USER: castopod
MYSQL_PASSWORD: mypassword
restart: unless-stopped
redis:
image: redis:7.0-alpine
container_name: "castopod-redis"
volumes:
- castopod-cache:/data
networks:
- castopod-app
# this container is optional
# add this if you want to use the videoclips feature
ffmpeg:
image: castopod/video-clipper:latest
container_name: "castopod-video-clipper"
volumes:
- castopod-media:/opt/castopod/public/media
environment:
MYSQL_DATABASE: castopod
MYSQL_USER: castopod
MYSQL_PASSWORD: mypassword
networks:
- castopod-db
restart: unless-stopped
volumes:
castopod-media:
castopod-db:
castopod-cache:
networks:
castopod-app:
castopod-db:
- create a nginx entry:
server {
server_name podcast.example.com;
location / {
proxy_pass http://localhost:8080;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_redirect off;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/podcast.example.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/podcast.example.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
server_name podcast.example.com;
listen 80;
return 404; # managed by Certbot
}
- run docker-compose up -d and install as usual
- Go to create podcast and fill the data
- Click on create podcast
Expected behavior
Create the podcast and show the information
Actual behavior
Raise an exception
Relevant logs and/or screenshots
CodeIgniter\Router\Exceptions\RouterException: The route for "actor" cannot be found. in /opt/castopod/vendor/codeigniter4/framework/system/Helpers/url_helper.php:543
Stack trace:
#0 /opt/castopod/vendor/codeigniter4/framework/system/Helpers/url_helper.php(543): CodeIgniter\Router\Exceptions\RouterException::forInvalidRoute('actor')
#1 /opt/castopod/app/Models/PodcastModel.php(411): url_to('actor', 'refractorizando')
#2 /opt/castopod/vendor/codeigniter4/framework/system/BaseModel.php(1480): App\Models\PodcastModel->createPodcastActor(Array)
#3 /opt/castopod/vendor/codeigniter4/framework/system/BaseModel.php(746): CodeIgniter\BaseModel->trigger('beforeInsert', Array)
#4 /opt/castopod/vendor/codeigniter4/framework/system/Model.php(667): CodeIgniter\BaseModel->insert(Array, true)
#5 /opt/castopod/modules/Admin/Controllers/PodcastController.php(247): CodeIgniter\Model->insert(Object(App\Entities\Podcast), true)
#6 /opt/castopod/modules/Admin/Controllers/PodcastController.php(43): Modules\Admin\Controllers\PodcastController->attemptCreate()
#7 /opt/castopod/vendor/codeigniter4/framework/system/CodeIgniter.php(926): Modules\Admin\Controllers\PodcastController->_remap('attemptCreate')
#8 /opt/castopod/vendor/codeigniter4/framework/system/CodeIgniter.php(482): CodeIgniter\CodeIgniter->runController(Object(Modules\Admin\Controllers\PodcastController))
#9 /opt/castopod/vendor/codeigniter4/framework/system/CodeIgniter.php(351): CodeIgniter\CodeIgniter->handleRequest(NULL, Object(Config\Cache), false)
#10 /opt/castopod/public/index.php(73): CodeIgniter\CodeIgniter->run()
#11 {main}
Context
- Castopod: 1.0.3
- OS: Ubuntu Server 20.04.5 LTS (Focal Fossa)
- Browser: Vivaldi (Chromium base)
- Web server: Nginx
- docker-compose version: 1.25.0
- docker version: 20.10.12
Edited by Yassine Doghri