From 96de1a1d0f5414f34e7f35c1fb859e2f1ec6533c Mon Sep 17 00:00:00 2001 From: acidburnmonkey Date: Wed, 6 Aug 2025 17:06:49 -0400 Subject: [PATCH] all done docker working --- Dockerfile | 11 +++-------- docker-compose.yml | 11 +++++++++++ nginx.conf | 2 +- start.sh | 2 +- 4 files changed, 16 insertions(+), 10 deletions(-) create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile index fc93131..b5e2610 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,13 +2,10 @@ FROM python:3.13-alpine # install nginx and runtime deps, plus a build-deps group for uv sync RUN apk add --no-cache nginx libffi openssl -RUN apk add --no-cache --virtual .build-deps build-base libffi-dev openssl-dev python3-dev +RUN apk add --no-cache --virtual .build-deps build-base libffi-dev openssl-dev python3-dev py3-pip # grab uv CLI -RUN mkdir -p /usr/local/bin \ - && wget -qO /usr/local/bin/uv https://ghcr.io/astral-sh/uv:latest/uv \ - && wget -qO /usr/local/bin/uvx https://ghcr.io/astral-sh/uv:latest/uvx \ - && chmod +x /usr/local/bin/uv /usr/local/bin/uvx +RUN pip install uv WORKDIR /app @@ -27,12 +24,10 @@ RUN uv run python manage.py collectstatic --noinput # copy nginx config COPY nginx.conf /etc/nginx/nginx.conf -EXPOSE 80 +EXPOSE 8088 # start.sh should launch both nginx and uvicorn COPY start.sh /start.sh RUN chmod +x /start.sh CMD ["/start.sh"] - - diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..86b5d47 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,11 @@ +--- +services: + website: + build: + context: . + dockerfile: Dockerfile + image: acidarchon.com + container_name: acidarchon.com + ports: + - 8088:8088 + restart: unless-stopped diff --git a/nginx.conf b/nginx.conf index fdccc87..5167b53 100644 --- a/nginx.conf +++ b/nginx.conf @@ -21,7 +21,7 @@ http { } server { - listen 80; + listen 8088; server_name _; # serve static files diff --git a/start.sh b/start.sh index 419f2bc..46f996a 100644 --- a/start.sh +++ b/start.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # Start uvicorn in background uv run uvicorn mysite.asgi:application --host 127.0.0.1 --port 8000 &