Skip to content

Commit 690de4d

Browse files
committed
Updated Docker instructions
1 parent 2da24ae commit 690de4d

File tree

1 file changed

+12
-17
lines changed

1 file changed

+12
-17
lines changed

documentation/DeveloperGuide.md

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,10 @@ NEXT_PUBLIC_ALLOWED_HTS=<heroku-app-url>,localhost,127.0.0.1
4444

4545
- After making changes, push to Heroku remote branch using `git push heroku main:main` to see the changes take effect on the deployed app. (If you would like to push a certain branch-a to Heroku, you can do so with `git push heroku branch-a:main`)
4646

47-
## Development Workflow
48-
49-
### Database Migration
50-
In the event, there is a need to update and migrate the database, perform the following steps.
51-
52-
53-
### Using Docker
54-
There is also the choice to deploy it with Docker.
47+
## Using Docker
48+
You can use Docker for the back-end.
5549

56-
1. To Dockerize, first ensure that you have [Docker installed in your host machine](https://www.docker.com/products/docker-desktop/), and that it is running.
50+
1. First, ensure that you have [Docker installed in your host machine](https://www.docker.com/products/docker-desktop/), and that it is running.
5751
2. Next, set up an `env.docker` file - you can use the `env.docker.sample` and insert the corresponding values there.
5852
3. Navigate to the folder in a terminal, then execute the following commands:
5953
```
@@ -62,22 +56,23 @@ There is also the choice to deploy it with Docker.
6256
# after it comes up, and in a separate window
6357
docker ps
6458
65-
# look for the CONTAINER ID that corresponds to lms_backend-django
66-
67-
# suppose the CONTAINER ID is e1e3075d13f7
68-
docker exec -it e1e3075d13f7 sh
69-
70-
# and when you're in, run the django migrations
71-
python manage.py migrate
59+
# run the django migrations
60+
docker-compose exec django python manage.py migrate
7261
7362
# also create a user so you can login to echoclass
74-
python manage.py createsuperuser
63+
docker-compose exec django python manage.py createsuperuser
7564
```
7665
If changes are made to the `models.py` files, remember do run the command `python manage.py makemigrations`.
7766
7867
4. In all subsequent runs, just run the command `docker compose up`
7968
69+
<!--
70+
## Development Workflow
71+
72+
### Database Migration
73+
In the event, there is a need to update and migrate the database, perform the following steps.
8074
75+
-->
8176
8277
# Design
8378

0 commit comments

Comments
 (0)