@@ -170,6 +170,11 @@ Here's how you can set it up:
170
170
git clone
[email protected] :adamspd/django-appointment.git
171
171
```
172
172
173
+ then go to the project's directory:
174
+ ``` bash
175
+ cd django-appointment
176
+ ```
177
+
173
178
2 . ** Prepare an .env File** : Create an ` .env ` file in the root directory of your project with your configuration
174
179
settings.
175
180
You should include your email host user and password for Django's email functionality (if you want it to work):
@@ -187,24 +192,41 @@ Here's how you can set it up:
187
192
docker-compose up -d --build
188
193
```
189
194
190
- 4 . ** Create a Superuser** : After the containers are running, create a superuser to access the Django admin interface:
195
+ or
196
+ ``` bash
197
+ docker compose up -d --build
198
+ ```
199
+
200
+ 4 . ** Run Migrations** : Run the migrations with the following command:
201
+
202
+ ``` bash
203
+ docker-compose exec web python manage.py migrate
204
+ ```
205
+
206
+ or
207
+ ``` bash
208
+ docker compose exec web python manage.py migrate
209
+ ```
210
+
211
+ 5 . ** Create a Superuser** : After the containers are running, create a superuser to access the Django admin interface:
191
212
192
213
``` bash
193
214
docker-compose exec web python manage.py createsuperuser
194
215
```
195
216
196
- 5. ** Access the Application** : Once the containers are running, you can access the application at ` localhost:8000` . The
197
- Django admin interface is available at ` localhost:8000/admin` .
198
- 6. ** Shut Down the Containers** : When you' re finished, you can shut down the containers with the following command:
199
-
217
+ or
200
218
` ` ` bash
201
- docker-compose down
202
- ```
203
- 7. **(Optional) Run Migrations**: If you make changes to the models or database, you can run the migrations with the
204
- following command:
219
+ docker compose exec web python manage.py createsuperuser
220
+ ` ` `
221
+
222
+ 6. ** Access the Application** : Once the containers are running, you can access the application at ` localhost:8000` . The
223
+ Django admin interface is available at ` localhost:8000/admin` . And from there, add the necessary configurations.
224
+ [Follow this documentation](https://github.com/adamspd/django-appointment/blob/main/docs/explanation.md).
225
+ 7. ** Shut Down the Containers** : When you' re finished, you can shut down the containers with the following command:
205
226
206
227
```bash
207
- docker-compose exec web python manage.py migrate
228
+ docker-compose down
229
+ # docker compose down
208
230
```
209
231
210
232
> **Note:** I used the default database settings for the Docker container.
@@ -249,4 +271,4 @@ I'm blocked on a few points.
249
271
250
272
# # About the Author
251
273
252
- Adams Pierre David - [Website](https://adamspierredavid.com/)
274
+ Adams Pierre David - [Website](https://adamspierredavid.com/)
0 commit comments