Skip to content

Commit

Permalink
Update docker and startServer script
Browse files Browse the repository at this point in the history
  • Loading branch information
vietnguyengit committed Dec 11, 2024
1 parent 2a5da51 commit ca066e5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# Use the official Python base image
FROM python:3.10-slim

# Set the working directory in the container
WORKDIR /app
RUN useradd -l -m -s /bin/bash appuser

# Copy the pyproject.toml and poetry.lock files into the container
COPY pyproject.toml poetry.lock ./

# For Docker build to understand the possible env
Expand All @@ -16,8 +14,10 @@ RUN apt update && \
poetry lock && \
poetry install

# Expose the port the app runs on
EXPOSE 8000

# Copy the rest of the application code into the container
COPY . /app

RUN chown -R appuser:appuser /app
USER appuser

EXPOSE 8000
2 changes: 1 addition & 1 deletion startServer.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

docker compose build && docker compose up
docker compose down && docker compose build && docker compose up

0 comments on commit ca066e5

Please sign in to comment.