File size: 986 Bytes
e1969f9
b7a7f32
a799081
70f7a1b
b7a7f32
a799081
 
c2113b3
a799081
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5173a75
109da6a
a799081
4add580
382aeac
a799081
 
 
e1969f9
88dfa3e
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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"]