How can we debug apache superset that is a flask appbuilder application containerized with docker and comes with already a docker-compose.yml preconfigured for developement with its all dependencies. the question is how can we debug supereset running on docker ?
i tried to configure a remote interpreter but PyCharm (i have PyCharm 2022.3.2 (Professional Edition)) but the list of services does not show up
Related
I'm new to the DevOps world and I have been following this tutorial successfully, my Docker setup is almost identical to the one on the tutorial. I now would like to setup a Docker container with Django and Postgres but with Apache instead of NGINX for production. What commands should I add/modify to the Dockerfile, volumes and configurations to the docker-compose file and what configuration files should I have for the Apache configuration?
I'm using Pycharm Professional edition to maintain a Django web application hosted on a remote Linux OS. Until now I've used Expandrive to mount the remote volume as a local windows mapped drive and can use remote debugging.
However I would like to develop locally and deploy to the server which I've got working but struggling to configure the run/debug configuration in conjunction with the Django settings in preferences considering I use supervisor to control all the processes.
Here's a screenshot of my deployment configuration (connection)
Here's a screenshot of my deployment configuration (mappings)
Here's a screenshot of run/debug configuration
When I enable django support, point to my manage.py script and run the configuration it tries to run using manage.py whereas I want it to use the supervisor script. So I therefore get this:
However the real problem is I would like to control the remote supervisor from pycharm
For my Python + Django web project at workplace, we use Oracle Virtual box running Cent OS (Linux) clone image for all development and deployment. We use SSH clients namely mtputty and Mobaxterm depending on the developers choices.
We have checked out the project locally in windows and make it a shared folder for the clone running in Virtualbox. We are able to develop on Pycharm IDE by opening the files on shared folder.
This is the problem:
Though we are able to develop, we aren't able to remote debug on Pycharm IDE.
Is there a way to configure the remote debugging, so that when the server is running in the Virtual box, we can debug on the PyCharm.
Specs:
Python - 2.7
Django - 1.3.4
Pycharm - 4.5
I have done this by first:
1) Configuring the deployment and mapping in my project:
2) Then configure your Pycharm "Run/Debug Configurations", click on Run>Edit Configurations... click the plus sign and choose in the list "Django server".
In my configuration I'm forwarding my guest's port 8000 so I can access it on my host browser. You can do this on your vagrant file by adding:
config.vm.network "forwarded_port", guest: 8000, host: 8000
I tried to dockerize my django/apache web application.
In the big picture the dockerization worked out.
For deployment Annot is running in 3 containers. The apache_annot container holds the apache server and the postgresql database The media_annot container serves as web application media folder. The annot container holds the django python related code.
For development only 2 containers are needed: the apache_annot container and media_annot container. The django and python related code is placed into a directory at the host machine. apache_annot then simply mounts this directory as a data volume under /var/www/annot/.
Here the link to the Docker files:
https://gitlab.com/biotransistor/dock/tree/master
Issue:
Even the dockerized version works, it seems not to be done the real docker way.
Most annoying issue: Every time apache is restarted (which happens a lot in development) the apache_annot container and as such the whole web application stops.
To continuer apache_annot have to be restarted:
docker exec -ti apache_annot /bin/bash
Then postgresql database have to be restarted:
/etc/init.d/postgresql start
And cd into /var/www/annot/ to execute django development specific python code like:
python3 manage.py makemigrations.
It is nearly not possible to do development with this solution.
I can not be the only one who like to use a dockerize django apache developer environment. What do I do wrong?
Is there a way to run apache_annot so that the apache daemon can be rebooted without shouting down the apache_annot docker container?
My app is running inside a docker image (My development team never install software in their machines, only the docker images have the dependencies).
I Need to debug something using pycharm debugger, how do I connect pycharm's debugger to the docker image's python?
One possible method is to treat your Docker container as a remote host and use remote debugging: https://www.jetbrains.com/pycharm/help/remote-debugging.html