No project description provided
Project description
Index
- 1 Description
- 2 Version History
- 3 How to install
- 4 How it works
- 5 How to update this package
- 6 Example Files
1. Description
This package creates a docker-compose.yml and a .env file by combining multiple application's docker services and environment variables.
2. Version History
Latest Version: 0.3
3. How to install
Run the following command in your terminal:
pip install create-docker-compose==0.1
4. How it works
4.1 How to create a docker-compose.yml file
For each application that you want to include in your docker-compose.yml file, you need to create a file called docker-config.yml with the relevant services required for that app. You directory structure would look something like this:
An example of a docker-config.yml file can be found at the end of the readme at
Once all your docker-config.yml files have been created, run the following command at your projects root directory:
create_docker_compose
It will then compile all the services in all your docker-config.myl files into a single docker-compose.yml file as highlighted in the directory structure above.
4.2 How to create a .env file
For each application that you want to include in your .env file, you need to create a file called env_config.json with the relevant environment variables required for that app. You can refer to the previous directory structure again.
An example of a env_config.json file can be found at the end of the readme at
Once all your docker-config.yml files have been created, run the following command at your projects root directory:
create_env_file
It will then compile all the environment variables in all your env_config.json files into a single .env file as highlighted in the directory structure above.
5. How to update this package
To update your package on PyPI, you’ll need to make the desired changes to your package (e.g. update the code, add new files, etc.), update the version number in your setup.py file, and then rebuild and re-upload your package using the same commands as before:
python setup.py sdist bdist_wheel
twine upload dist/*
Make sure to increment the version number in your setup.py file before uploading the new version of your package. This will allow users to distinguish between different versions of your package and upgrade to the latest version using pip install --upgrade hello.
6. Example Files
6.1 docker-config.yml example
your-project-frontend:
build:
context: ./Your Project/Frontend
container_name: your-project-frontend
stdin_open: true
environment:
- CHOKIDAR_USEPOLLING=true
- WDS_SOCKET_PORT=0
- PORT=3002
volumes:
- ./Your Project/Frontend:/code
- '/code/node_modules'
ports:
- 3000:3000
networks:
- docker-network
6.2 env_config.json example
{
"DJANGO_ALLOWED_HOSTS": [
"192.34.0.78",
"localhost",
"neura-dbms-backend"
],
"DJANGO_ALLOWED_ORIGINS": [
"http://localhost:7003",
"http://localhost:3003"
],
"SECRET_KEY_DBMS": "'secret_key'",
"JWT_KEY": "'secret_key'"
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file create_docker_compose-0.3.tar.gz
.
File metadata
- Download URL: create_docker_compose-0.3.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 14d93e3fbb26d9b47bca6013f43836d073d3b5eca6f16b0fd612010329e8e95d |
|
MD5 | 15313c77ad30328d40aaa3708232c918 |
|
BLAKE2b-256 | 1da1f1316c3c6cfa952fa0d40956851c737a4af2dc948a47e004f151e7455ab1 |
File details
Details for the file create_docker_compose-0.3-py3-none-any.whl
.
File metadata
- Download URL: create_docker_compose-0.3-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3ddeeeecfc0ff064a740eeab80d78224359d57e31499040972d49e54535097d |
|
MD5 | ebacb2aed19ee1fa8cdf514ec70e0718 |
|
BLAKE2b-256 | 9fb2e73e01ac7707113834adda345546cffef00b68bdd1d8bf4013d5fe539c30 |