fix docker

This commit is contained in:
jr-k 2024-07-22 03:23:19 +02:00
parent 3b04f4a47d
commit 78aacdee51
4 changed files with 20 additions and 10 deletions

View File

@ -1,11 +1,13 @@
FROM python:3.9.17-alpine3.17
RUN apk add --no-cache --virtual .build-deps gcc musl-dev sqlite-dev exfat-fuse ntfs-3g build-base linux-headers
# Install ffmpeg and other dependencies
RUN apk add --no-cache gcc musl-dev sqlite-dev ntfs-3g ffmpeg build-base linux-headers
WORKDIR /app
COPY . .
RUN pip install -r requirements.txt && apk del .build-deps gcc musl-dev sqlite-dev exfat-fuse ntfs-3g build-base linux-headers
# Install Python dependencies
RUN pip install -r requirements.txt
ENTRYPOINT ["python", "/app/obscreen.py"]

View File

@ -5,12 +5,16 @@ services:
dockerfile: Dockerfile
container_name: obscreen
restart: unless-stopped
image: obscreen:latest
environment:
- DEBUG=${DEBUG-false}
- PORT=${PORT-5000}
- SECRET_KEY=${SECRET_KEY-ANY_SECRET_KEY_HERE}
- DEMO=false
- DEBUG=false
- SECRET_KEY=ANY_SECRET_KEY_HERE
- PORT=5000
- PORT_HTTP_EXTERNAL_STORAGE=5001
volumes:
- .:/app
- ./data/db:/app/data/db
- ./data/uploads:/app/data/uploads
- ./var/run/storage:/app/var/run/storage
ports:
- ${PORT}:${PORT}
- 5000:5000
- 5001:5001

View File

@ -4,11 +4,15 @@ services:
restart: unless-stopped
image: jierka/obscreen:latest
environment:
- DEMO=false
- DEBUG=false
- PORT=5000
- SECRET_KEY=ANY_SECRET_KEY_HERE
- PORT=5000
- PORT_HTTP_EXTERNAL_STORAGE=5001
volumes:
- ./data/db:/app/data/db
- ./data/uploads:/app/data/uploads
- ./var/run/storage:/app/var/run/storage
ports:
- 5000:5000
- 5001:5001

View File

@ -19,7 +19,7 @@ sleep 3
# Install system dependencies
sudo apt-get update
sudo apt-get install -y git python3-pip python3-venv libsqlite3-dev exfat-fuse ntfs-3g
sudo apt-get install -y git python3-pip python3-venv libsqlite3-dev ntfs-3g ffmpeg
# Get files
cd $WORKING_DIR