compose/pycharm -> compose/debug
|
@ -5,8 +5,8 @@
|
|||
To debug python code inside a docker container, you have to first run:
|
||||
|
||||
$ docker-compose -f debug.yml up
|
||||
|
||||
Container should be ready, when
|
||||
|
||||
Container should be ready, when
|
||||
|
||||
...
|
||||
debug_1 | Starting OpenBSD Secure Shell server: sshd
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 57 KiB |
Before Width: | Height: | Size: 143 KiB After Width: | Height: | Size: 143 KiB |
|
@ -6,7 +6,7 @@ postgres:
|
|||
- /data/{{cookiecutter.repo_name}}/postgres:/var/lib/postgresql/data
|
||||
|
||||
debug:
|
||||
build: compose/pycharm/
|
||||
build: compose/debug/
|
||||
command: python -c "import signal; signal.pause()"
|
||||
ports:
|
||||
- "8000:8000"
|
||||
|
|
|
@ -12,7 +12,7 @@ There is a better tool to login into container if you want to access to shell, i
|
|||
.. _docker exec: https://docs.docker.com/reference/commandline/exec/
|
||||
.. _attempts on StackOverflow: http://stackoverflow.com/a/28675525/338581
|
||||
|
||||
To avoid putting sshd into production-ready docker image, we create another docker image on top of main ``{{ cookiecutter.repo_name|replace('_', '') }}_django`` image from `compose/pycharm/Dockerfile <../compose/pycharm/Dockerfile>`_. That's why you have to first build main `Dockerfile <../Dockerfile>`_, and you can do that by::
|
||||
To avoid putting sshd into production-ready docker image, we create another docker image on top of main ``{{ cookiecutter.repo_name|replace('_', '') }}_django`` image from `compose/debug/Dockerfile <../compose/debug/Dockerfile>`_. That's why you have to first build main `Dockerfile <../Dockerfile>`_, and you can do that by::
|
||||
|
||||
$ docker-compose -f dev.yml build
|
||||
|
||||
|
@ -35,7 +35,7 @@ You can test ssh conection using password *docker*, by::
|
|||
|
||||
or you can also use ssh-key::
|
||||
|
||||
ssh -i compose/pycharm/.ssh_keys_to_docker/id_rsa docker_{{ cookiecutter.repo_name }}@localhost -p 2222
|
||||
ssh -i compose/debug/.ssh_keys_to_docker/id_rsa docker_{{ cookiecutter.repo_name }}@localhost -p 2222
|
||||
|
||||
|
||||
PyCharm
|
||||
|
|