Specify the project name of docker-compose with Docker integration of Pycharm

Hello sekitaka.

How to specify the Project Name of Pychar's docker-compose

It seems that the Project Name can be specified by specifying the COMPOSE_PROJECT_NAME environment variable in addition to specifying it to execute the docker-compose command. From Preferences> Project> Project Interpreter, set COMPOSE_PROJECT_NAME to any Project Name in ʻEnvironment variables` of Docker Compose settings.

mypy.jpg

Background

I was using docker started with docker-compose as a python interpreter in Pycharm, but even if I build it with docker-compose -p <project name> -f <path to docker-compose.yml> build , I was addicted to the environment running from Pycharm not being up to date.

Cause

I created a docker directory for docker directly under the project, and placed docker-compose.yml and Dockerfile under it. Pycharm seems to be executed without specifying the Project Name of docker-compose, and if it is left as it is, the image name when executed from Pycharm will be docker_ <service name> _ serial number.

I was specifying the Project Name via the helper script when building, so it was a punch line that the image used by Pycharm could not be updated.

Recommended Posts

Specify the project name of docker-compose with Docker integration of Pycharm
Get the host name of the host PC with Docker on Linux
Note: Prepare the environment of CmdStanPy with docker
Prepare the execution environment of Python3 with Docker
Rewrite the name of the namespaced tag with lxml
Preparing the execution environment of PyTorch with Docker November 2019
Using Docker (Hyper-V) with PyCharm on Windows 10 (as of August 2017)
Until the start of the django tutorial with pycharm on Windows
The story of not being able to run pygame with pycharm
Settings until the Dango project is started on the server with Pycharm
Color the integration interval with matplotlib.pyplot
Access the Docker Remote API with Requests
I checked the contents of docker volume
Run the IDCF cloud CLI with Docker
Align the size of the colorbar with matplotlib
Behind the flyer: Using Docker with Python
Check the existence of the file with python
[Python] Get the variable name with str
The third night of the loop with for
The Python project template I think of.
When changing the table name with flask_migrate
The second night of the loop with for
Set the process name of the Python program
Count the number of characters with echo
If you think the PyCharm environment is broken, it's because of the file name
Specify the start and end positions of files to be included with qiitap
Make it easy to specify the time of AWS CloudWatch Events with CDK.