Skip to content

Commit 272ee27

Browse files
committed
Deployment files
1 parent 04585ac commit 272ee27

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed

ch09/planner/.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
venv
2+
.env
3+
.git

ch09/planner/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM python:3.10
2+
3+
WORKDIR /app
4+
5+
ADD requirements.txt /app/requirements.txt
6+
7+
RUN pip install --upgrade pip && pip install -r /app/requirements.txt
8+
9+
EXPOSE 8080
10+
11+
COPY ./ /app
12+
13+
CMD ["python", "main.py"]

ch09/planner/docker-compose.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
version: "3"
2+
3+
services:
4+
api:
5+
build: .
6+
image: event-planner-api:latest
7+
ports:
8+
- "8080:8080"
9+
env_file:
10+
- .env.prod
11+
12+
database:
13+
image: mongo
14+
ports:
15+
- "27017"
16+
volumes:
17+
- data:/data/db
18+
19+
volumes:
20+
data:

0 commit comments

Comments
 (0)