Gurucool_Test / Dockerfile
ashwinR's picture
Update Dockerfile
88dfa3e
raw
history blame
986 Bytes
FROM python:3.9-slim
# Set the working directory in the container
WORKDIR /app
# Copy the current directory contents into the container
COPY . /app
# Install any needed packages specified in requirements.txt
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
supervisor \
postgresql \
redis-server && \
pip install --upgrade pip poetry && \
poetry config virtualenvs.create false && \
poetry install --no-interaction --no-ansi && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Copy supervisor configuration
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Set environment variable
ENV DATABASE_URL=postgresql://postadmin:postpass@localhost/siksalaya
# Make port 80 available to the world outside this container
EXPOSE 7860
# Add and give execution permissions to the startup script
COPY start.sh start.sh
RUN chmod +x start.sh
# Start services with Supervisor
CMD ["/usr/bin/supervisord"]