Skip to content

geek-id/django-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Django Docker

Build and develop simple django app with Docker

Spesification :

  • Django version 3.2.3 (latest version)
  • Python version 3.9.5 (latest version)
  • MariaDB/MySQL

How to use :

  1. Clone the repository

git clone https://github.com/geek-id/django-docker.git

  1. Edit Dockerfile

On the file of Dockerfile you can change django-app-folder to your folder django environment. Example your django app folder on the djangoproject, so you can type right there /djangoproject

  1. Edit docker-compose.yml

change this line :

 environment: 
   - MYSQL_DATABASE=app_django_name
   - MYSQL_ROOT_PASSWORD=******
   - MYSQL_USER=app_django_user
   - MYSQL_PASSWORD=******

to your environment you want.

and then change this line :

  volumes: 
    - .:/django-app-folder

to your path folder django project

  1. Build the docker

docker-compose run django django-admin startproject example

  1. Run the docker

docker-compose up

About

Build Django app with Docker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published