mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-01-23 02:35:14 +00:00
port updates
This commit is contained in:
parent
3e863c48f2
commit
9a027f1cc7
6 changed files with 16 additions and 13 deletions
|
|
@ -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),
|
||||
|
|
|
|||
|
|
@ -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"]
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ services:
|
|||
container_name: dispatcharr_web
|
||||
ports:
|
||||
- "9191:9191"
|
||||
- "3031:3031"
|
||||
- "5656:5656"
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
|
|
|
|||
|
|
@ -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}" <<EOF
|
||||
DO \$\$
|
||||
BEGIN
|
||||
IF NOT EXISTS (SELECT FROM pg_roles WHERE rolname = '$POSTGRES_USER') THEN
|
||||
CREATE ROLE $POSTGRES_USER WITH LOGIN PASSWORD '$POSTGRES_PASSWORD';
|
||||
END IF;
|
||||
END
|
||||
DO \$\$
|
||||
BEGIN
|
||||
IF NOT EXISTS (SELECT FROM pg_roles WHERE rolname = '$POSTGRES_USER') THEN
|
||||
CREATE ROLE $POSTGRES_USER WITH LOGIN PASSWORD '$POSTGRES_PASSWORD';
|
||||
END IF;
|
||||
END
|
||||
\$\$;
|
||||
EOF
|
||||
echo_with_timestamp "Setting PostgreSQL user privileges..."
|
||||
|
|
@ -131,4 +131,4 @@ su - $POSTGRES_USER -c 'cd /app && celery -A dispatcharr worker --loglevel=info
|
|||
|
||||
# Start Gunicorn
|
||||
echo_with_timestamp "Starting Gunicorn..."
|
||||
su - $POSTGRES_USER -c 'cd /app && gunicorn --workers=4 --worker-class=gevent --timeout=300 --bind 0.0.0.0:9191 dispatcharr.wsgi:application'
|
||||
su - $POSTGRES_USER -c 'cd /app && gunicorn --workers=4 --worker-class=gevent --timeout=300 --bind 0.0.0.0:5656 dispatcharr.wsgi:application'
|
||||
|
|
|
|||
|
|
@ -3,4 +3,4 @@
|
|||
apk add nodejs npm
|
||||
cd /app/
|
||||
npm i
|
||||
PORT=3031 npm run start
|
||||
PORT=9191 npm run start
|
||||
|
|
|
|||
|
|
@ -49,5 +49,5 @@
|
|||
"last 1 safari version"
|
||||
]
|
||||
},
|
||||
"proxy": "http://127.0.0.1:9191"
|
||||
"proxy": "http://127.0.0.1:5656"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue