-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (26 loc) · 923 Bytes
/
Dockerfile
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
# Use the official Python image as the base image
FROM python:3.9-slim
# Install PostgreSQL development package inside the container
RUN apt-get update \
&& apt-get -y install libpq-dev gcc \
&& pip install psycopg2
# Set the working directory inside the container
WORKDIR /app
# Copy the requirements.txt file into the container
COPY requirements.txt .
# Copy the alembic folder into the container
COPY alembic alembic
# Copy the alembic.ini file into the container
COPY alembic.ini .
# Copy the entrypoint.sh script into the container
COPY entrypoint.sh .
# Copy the .env script into the container
COPY .env .env
# Copy the entire app directory into the container
COPY app app
# Install the required Python packages
RUN pip install --no-cache-dir -r requirements.txt
# Make the entrypoint script executable
RUN chmod +x entrypoint.sh
# Set the entrypoint for the container
ENTRYPOINT ["./entrypoint.sh"]