mirror of
https://github.com/joaovitoriasilva/endurain.git
synced 2026-01-10 08:17:59 -05:00
43 lines
1.1 KiB
Plaintext
43 lines
1.1 KiB
Plaintext
FROM python:3.11
|
|
|
|
# Links Docker image with repository
|
|
LABEL org.opencontainers.image.source https://github.com/joaovitoriasilva/gearguardian
|
|
|
|
# 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/*
|
|
|
|
# Make port 80 available to the world outside this container
|
|
EXPOSE 80
|
|
|
|
# Copy the directory backend contents to /app
|
|
COPY backend /app
|
|
|
|
# Define environment variable
|
|
ENV DB_HOST=""
|
|
ENV DB_PORT=3306
|
|
ENV DB_USER=""
|
|
ENV DB_PASSWORD=""
|
|
ENV DB_DATABASE=""
|
|
ENV SECRET_KEY=""
|
|
ENV ALGORITHM="HS256"
|
|
ENV ACCESS_TOKEN_EXPIRE_MINUTES=30
|
|
ENV STRAVA_CLIENT_ID=""
|
|
ENV STRAVA_CLIENT_SECRET=""
|
|
ENV STRAVA_AUTH_CODE=""
|
|
ENV JAEGER_HOST=""
|
|
ENV STRAVA_DAYS_ACTIVITIES_ONLINK=30
|
|
|
|
# Run main.py when the container launches
|
|
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "80"]
|