Skip to content

Commit

Permalink
deploy: setup docker and compose files
Browse files Browse the repository at this point in the history
  • Loading branch information
tbdsux committed Jan 3, 2025
1 parent e92d136 commit b1fd46a
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM python:3.12-slim

# Install uv.
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/

# Copy the application into the container.
COPY . /app

# Install the application dependencies.
WORKDIR /app
RUN uv sync --frozen --no-cache

# Run the application.
CMD ["/app/.venv/bin/fastapi", "run", "app/main.py", "--port", "8000", "--host", "0.0.0.0"]
7 changes: 7 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
services:
app:
build:
context: .
dockerfile: Dockerfile
ports:
- 8000:8000
14 changes: 14 additions & 0 deletions dokploy.docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
services:
app:
build:
context: .
dockerfile: Dockerfile
restart: always
expose:
- 8000
networks:
- dokploy-network

networks:
dokploy-network:
external: true

0 comments on commit b1fd46a

Please sign in to comment.