diff --git a/dispatcharr/urls.py b/dispatcharr/urls.py index d0bc5def..42d75f47 100644 --- a/dispatcharr/urls.py +++ b/dispatcharr/urls.py @@ -24,6 +24,7 @@ schema_view = get_schema_view( urlpatterns = [ # API Routes path('api/', include(('apps.api.urls', 'api'), namespace='api')), + path('output/', include('apps.output.urls', namespace='output')), # Admin path('admin/', admin.site.urls), diff --git a/docker/Dockerfile b/docker/Dockerfile index 57d0d966..9320b88d 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -12,6 +12,8 @@ RUN apt-get update && apt-get install -y \ # Set the working directory WORKDIR /app +ENV API_PORT=5656 + # Install Python dependencies COPY requirements.txt /app/ RUN pip install --no-cache-dir -r requirements.txt @@ -31,5 +33,5 @@ RUN python manage.py migrate --noinput || true # Expose port 9191 (this is the port the app will listen on inside the container) EXPOSE 9191 -# Command to run the application binding to port 9191 -CMD ["gunicorn", "--workers=4", "--worker-class=gevent", "--timeout=300", "--bind", "0.0.0.0:9191", "dispatcharr.wsgi:application"] +# Command to run the application binding to host and port +CMD ["gunicorn", "--workers=4", "--worker-class=gevent", "--timeout=300", "--bind", "0.0.0.0:5656", "dispatcharr.wsgi:application"] diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 648b9c77..e80eff40 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -6,7 +6,7 @@ services: container_name: dispatcharr_web ports: - "9191:9191" - - "3031:3031" + - "5656:5656" depends_on: - db - redis diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index a928ce69..bb64bfe7 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -49,7 +49,7 @@ if [ -z "$(ls -A "$PGDATA")" ]; then mkdir -p "$PGDATA" chown -R postgres:postgres "$PGDATA" chmod 700 "$PGDATA" - + # Initialize PostgreSQL su - postgres -c "$PG_BINDIR/initdb -D $PGDATA" # Configure PostgreSQL @@ -75,12 +75,12 @@ if ! su - postgres -c "psql -p ${POSTGRES_PORT} -tAc \"SELECT 1 FROM pg_database # Create user, set ownership, and grant privileges echo_with_timestamp "Creating PostgreSQL user..." su - postgres -c "psql -p ${POSTGRES_PORT} -d ${POSTGRES_DB}" <