Skip to content

Commit

Permalink
fixed a redirect issue
Browse files Browse the repository at this point in the history
also normalized a few variable names
  • Loading branch information
autonomouscereal committed Oct 9, 2024
1 parent dadff8f commit ccf9ad9
Show file tree
Hide file tree
Showing 5 changed files with 386 additions and 276 deletions.
20 changes: 11 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,23 @@ WORKDIR /app

# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
libpq-dev \
postgresql \
postgresql-contrib \
supervisor \
&& rm -rf /var/lib/apt/lists/*
build-essential \
libpq-dev \
postgresql \
postgresql-contrib \
&& rm -rf /var/lib/apt/lists/*

# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Install Supervisor using pip for Python 3
RUN pip install supervisor

# Copy the application code
COPY . .

# Copy the supervisor configuration file
# Copy and set up Supervisor configuration
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf

# Copy the initialization script
Expand All @@ -41,5 +43,5 @@ RUN mkdir -p /var/log/postgresql && mkdir -p /var/log/fastapi
# Expose port 3100
EXPOSE 3100

# Set the entrypoint to run the init script before starting supervisord
ENTRYPOINT ["/bin/bash", "-c", "/init.sh && /usr/bin/supervisord -n"]
# Entrypoint to initialize PostgreSQL and start Supervisor
ENTRYPOINT ["/bin/bash", "-c", "/init.sh && supervisord -n -c /etc/supervisor/conf.d/supervisord.conf"]
2 changes: 1 addition & 1 deletion credential_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def get_db_credentials():
return {
'user': os.environ.get('db_username'),
'password': os.environ.get('db_password'),
'database': os.getenv('OAUTHDB','OAUTHDB'),
'database': os.getenv('OAUTHDB', 'OAUTHDB'),
'host': os.getenv('DB_HOST', 'localhost'),
'port': int(os.getenv('DB_PORT', 5999))
}
Expand Down
Loading

0 comments on commit ccf9ad9

Please sign in to comment.