Files
endurain/Dockerfile_backend
João Vitória Silva 245cec7945 Frontend revamp with Vue
[frontend] Created UserAvatarComponent to make better reusability of this component and adapted views and components to it
[frontend] It is now possible to upload a photo of the user when creating the user
[frontend] Deleting the user deletes the photo in the filesystem
[backend] Added logic to receive uploaded user photo and store it in the filesystem under user_images directory
[backend] Added logic to /user_images be routed when requested
[docker] Updated docker files and example docker compose file
2024-05-23 14:05:19 +01:00

49 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 STRAVA_CLIENT_ID="changeme"
ENV STRAVA_CLIENT_SECRET="changeme"
ENV STRAVA_AUTH_CODE="changeme"
ENV JAEGER_ENABLED="true"
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"]