mirror of
https://github.com/joaovitoriasilva/endurain.git
synced 2026-01-10 08:17:59 -05:00
[backend] Created new alembic migration to remove unused photo_path_aux column from users table. This new migration also changes default admin password to new hashing method [backend] Moved password hashing on login to backend [backend] Added env variable for expire token in minutes [backend] Rename file schema_session/schema_access_token to dependencies_security [backend] Started changing session dependencies functions to handle token in the request cookie [frontend] Started updating api calls logic [frontend] Moved login store logic to pinea store instead of local storage [README] Updated README with new env variable for backend
50 lines
1.4 KiB
Plaintext
50 lines
1.4 KiB
Plaintext
FROM python:3.11
|
|
|
|
# Links Docker image with repository
|
|
LABEL org.opencontainers.image.source https://github.com/joaovitoriasilva/endurain
|
|
|
|
# Set the working directory
|
|
WORKDIR /app
|
|
|
|
# Copy the requirements.txt file to /app
|
|
COPY requirements.txt /app
|
|
|
|
# Install any needed packages specified in requirements.txt and then remove requirements.txt file
|
|
# Remove any temporary files or directories created during the build process
|
|
# Cache Cleanup
|
|
RUN pip install --no-cache-dir --upgrade -r requirements.txt \
|
|
&& rm requirements.txt \
|
|
&& apt-get clean \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Copy the directory backend contents to /app
|
|
COPY backend /app
|
|
|
|
# Make port 80 available to the world outside this container
|
|
EXPOSE 80
|
|
|
|
# Define environment variables
|
|
ENV DB_HOST="mariadb"
|
|
ENV DB_PORT=3306
|
|
ENV DB_USER="endurain"
|
|
ENV DB_PASSWORD="changeme"
|
|
ENV DB_DATABASE="endurain"
|
|
ENV SECRET_KEY="changeme"
|
|
ENV ALGORITHM="HS256"
|
|
ENV ACCESS_TOKEN_EXPIRE_MINUTES=30
|
|
ENV REFRESH_TOKEN_EXPIRE_DAYS=7
|
|
ENV STRAVA_CLIENT_ID="changeme"
|
|
ENV STRAVA_CLIENT_SECRET="changeme"
|
|
ENV STRAVA_AUTH_CODE="changeme"
|
|
ENV JAEGER_ENABLED="false"
|
|
ENV JAEGER_HOST="jaeger"
|
|
ENV JAEGER_PROTOCOL="http"
|
|
ENV JAGGER_PORT=4317
|
|
ENV STRAVA_DAYS_ACTIVITIES_ONLINK=30
|
|
ENV FRONTEND_PROTOCOL="http"
|
|
ENV FRONTEND_HOST="frontend"
|
|
ENV FRONTEND_PORT=8080
|
|
ENV GEOCODES_MAPS_API="changeme"
|
|
|
|
# Run main.py when the container launches
|
|
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "80"] |