As a first step, you must install the following dependencies:
- docker-engine: https://docs.docker.com/engine/installation/
- docker-compose: https://docs.docker.com/compose/install/
Then continue to the docker initialization step.
As a first step, you must install the following dependencies:
- Docker Toolbox: https://www.docker.com/toolbox
You must do the next set of command from the docker quickstart terminal.
Then continue to the docker initialization step.
As a first step, you must install the following dependencies:
- Docker Toolbox :https://www.docker.com/toolbox
Notice: Virtualisation must be enable on your computer
You must do the next set of command from the docker quickstart terminal.
Then continue to the docker initialization step.
$> git clone https://github.com/savoirfairelinux/sous-chef
$> docker-compose build
$> docker-compose up
If you want to run docker-compose with the production settings
$> docker-compose -f docker-compose.yml -f docker-compose.prod.yml up
Docker must be up and running at this point.
You need the Docker container ID to run the next steps. You can get the container_id by running docker ps
.
Ex: 44fcfefb015e
docker exec -it [container_id] bash
# Move to the application root dir
cd src
# Run development server
python manage.py runserver 0.0.0.0:8080
# Access to the development server
http://0.0.0.0:8080
# Access to Nginx server
http://127.0.0.1
# Run existing migrations
python manage.py migrate
# Create a user with administrator privileges
python manage.py createsuperuser
# Optional: Load the initial data set
python3 manage.py loaddata sample_data
$> docker-compose exec web sh -c "cd tools/gulp && gulp"
You should now be ready to run the Django application by pointing your browser to the container address.
On Linux and OS X, open http://localhost:8000.
On Windows, use the container IP address.
TERM environment not set
: dockerfile/mariadb#3listen tcp 0.0.0.0:8000: bind: address already in use
: an another application already uses the 8000 port. Vagrant applications often use the same port for instance. Locate the application and shut it down, or select an other port.Web server is up and running, but no answer after Django initialization
: restart your container.Static files fail to load when using Nginx server in development mode (docker-compose up)
: rundocker-compose exec web python src/manage.py collectstatic