-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnotes
More file actions
38 lines (28 loc) · 1.57 KB
/
Copy pathnotes
File metadata and controls
38 lines (28 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
1. CONFIGURATION DOCKER FILE
2. RUN DOCKER FILE
- docker build . : this command after writing DockerFile
- docker-compose build : this command after writing docker-compose.yml
3. CREATING DJANGO PROJECT
- docker-compose run app sh -c "django-admin.py startproject app ."
4. ENABLE TRAVIS-CI for PROJECT in gITHUB :
Def : is a hosted continuous integration service used to build and test software projects hosted on GitHub
Def : Travis CI permet non seulement de tester des applications ou logiciels en développement, mais aussi d’effectuer automatiquement leur déploiement. Travis CI est un outil gratuit pour les projets open source.
- creating .travis.yml with script CONFIGURATION
5. ADDING FLAKE8 FOR LINTING
- adding flake in requirements.txt
- creation .flake8 file config in app
6. WRITING TDD : TEST DRIVEN DEVELOPMENT : is simply when you write test before you write the code
- docker-compose run app sh -c "python manage.py test" : command to run test
7. CREATE AN APP
- docker-compose run app sh -c "python manage.py startapp core"
8. CUSTOMER USER MODEL
- creating a model and userManager class
- in settings add AUTH_USER_MODEL = 'core.User'
- then migrate with command : docker-compose run app sh -c "python manage.py makemigrations core"
9. ADDING POSTGRES DATABASE TO DOCKER
- add service in docker file
- in requirements.txt adding : psycopg2 : this package is recommended by django to communicate with postgressql
- in dockerfile add line 7,8,11
10. USING MOCK
11. RUN THE APP SERVER
- docker-compose up