GalsenDEV Docker Demo
This is a basic
Django dev environment setup with
docker-compose for a GalsenDev Meetup. The main purposes was to make a simple presentation of
docker and its capabilities.
First, you need to install
docker-composein your system. Checkout the official docs:
After having cloned this repo, go to it using your terminal and enter the following command:
If you have issues related to permission or write rights, you can run :
sudo chown -R $USER:$USER .
If everything goes well, congratulations, you can start coding! You can visit http://localhost:8000
Environment variable usage
If you take a good look at the docker compose file, I hardened the database credentials, which is not a good practice. To remedy this, it is better to use environment variables instead of hardening these values in the configurations. You'll fine the updated
.env file on this branch.
Pull the branch set-env-variables
.envand set values for variables defined in it
Run the following command:
docker-compose --env-file .env up
Feel free to make a PR or report an issue
Oh, one more thing, please do not forget to put a description when you make your PR