Skip to content

Commit 4d0a68b

Browse files
Jade WibbelsJade Wibbels
authored andcommitted
update docker compose with AWS env vars
1 parent 302dc7f commit 4d0a68b

File tree

5 files changed

+563
-3
lines changed

5 files changed

+563
-3
lines changed

Dockerfile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ COPY requirements.txt requirements.txt
1010
# Install dependencies
1111
RUN pip install --no-cache-dir -r requirements.txt
1212

13-
COPY . app/
13+
COPY . .
1414

15-
CMD ["bash"]
15+
16+
# Expose the port the app runs on
17+
EXPOSE 8000
18+
19+
# Command to run the FastAPI application
20+
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]

docker-compose.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,12 @@ services:
66
volumes:
77
- .:/app # Mount the current directory to /app in the container
88
working_dir: /app
9+
ports:
10+
- "8000:8000" # Map port 8000 on the host to port 8000 in the container
911
stdin_open: true # Keep the container open for bash access
10-
tty: true
12+
tty: true
13+
environment:
14+
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
15+
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
16+
- AWS_DEFAULT_REGION=${AWS_DEFAULT_REGION}
17+
command: uvicorn app.main:app --host 0.0.0.0 --port 8000

mydeployment.zip

6.12 MB
Binary file not shown.

0 commit comments

Comments
 (0)