I want to use PyCharm's debugging tools and separate test launches while yet being able to put my full working environment within Docker containers. Remote Interpreter for PyCharm
I have the following configs:
Dockerfile:
FROM python:3.6
ENV PYTHONUNBUFFERED 0
COPY requirements.txt .
RUN pip install --no-cache-dir -r ./requirements.txt
docker-compose.dev.yml
version: '2'
services:
web:
container_name: django-first-ci-dev--web
build: .
command: python manage.py runserver 0.0.0.0:8000
volumes:
- ./:/django-ci
working_dir: /django-ci
env_file:
- .envs
links:
- postgres:postgres
depends_on:
- postgres
ports:
- '8000:8000'
postgres:
container_name: django-first-ci-dev--postgres
image: postgres:latest
volumes:
- ./docker-volumes-dev/psql-data:/var/lib/postgresql/data
env_file:
- .envs
ports:
- '5432:5432'
Everything functions perfectly on its own, changes are made instantly, and the environment is solitary. But using PyCharm for both debugging and running separate tests is not possible. I did as instructed in the documentation:
Launch logs:
Removing django-first-ci-dev--web
django-first-ci-dev--postgres is up-to-date
Recreating 6eb846916022_django-first-ci-dev--web ...
Attaching to django-first-ci-dev--web
django-first-ci-dev--web exited with code 0
Aborting on container exit...
Process finished with exit code 0
The container logs are empty. Why is the container with Django cut down? Thank you.