Skip to content

Commit 86d818f

Browse files
committed
Updated readme
1 parent 247e8f4 commit 86d818f

File tree

2 files changed

+47
-2
lines changed

2 files changed

+47
-2
lines changed

Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ COPY . /app
1010
RUN pip install --no-cache-dir -r requirements.txt
1111

1212
# Labels
13-
LABEL author="Adams Pierre David"
14-
LABEL maintainer="Adams Pierre David"
13+
MAINTAINER Adams Pierre David <[email protected]>
1514
LABEL version="1.0"
1615
LABEL description="Docker Image to test django-appointment package in a container."
1716

README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,52 @@ see their [release notes](https://github.com/adamspd/django-appointment/tree/mai
144144
8. Visit http://127.0.0.1:8000/appointment/request/<service_id>/ to view the available time slots and schedule an
145145
appointment.
146146

147+
## Docker Support 🐳
148+
149+
Django-Appointment now supports Docker, making it easier to set up, develop, and deploy. With Docker and Docker Compose,
150+
you can quickly get the project running in a consistent environment, streamline the development process, and simplify
151+
deployment across different platforms.
152+
153+
### Getting Started with Docker
154+
155+
To use Django-Appointment with Docker, follow these steps:
156+
157+
1. **Prepare .env File**: Create an `.env` file in the root directory of your project with your configuration settings.
158+
You should include your email host user and password for Django's email functionality:
159+
160+
```plaintext
161+
EMAIL_HOST_USER=your_email@gmail.com
162+
EMAIL_HOST_PASSWORD=your_password
163+
```
164+
2. **Build and Run the Docker Containers**: Run the following command to build and run the Docker containers:
165+
166+
```bash
167+
docker-compose up -d --build
168+
```
169+
170+
3. **Create a Superuser**: After the containers are running, create a superuser to access the Django admin interface:
171+
172+
```bash
173+
docker-compose exec web python manage.py createsuperuser
174+
```
175+
176+
4. **Access the Application**: Once the containers are running, you can access the application at `localhost:8000`. The
177+
Django admin interface is available at `localhost:8000/admin`.
178+
5. **Shut Down the Containers**: When you're finished, you can shut down the containers with the following command:
179+
180+
```bash
181+
docker-compose down
182+
```
183+
6. **(Optional) Run Migrations**: If you make changes to the models or database, you can run the migrations with the
184+
following command:
185+
186+
```bash
187+
docker-compose exec web python manage.py migrate
188+
```
189+
190+
> **Note:** I use the default database settings for the Docker container. If you want to use a different database, you can
191+
modify the Dockerfile and docker-compose.yml files to use your preferred database.
192+
147193
## Customization 🔧
148194

149195
1. In your Django project's `settings.py`, you can override the default values for the appointment scheduler. More

0 commit comments

Comments
 (0)