Fakultas Ilmu Komputer UI

Dockerfile 387 Bytes
Newer Older
Ryan Karyadiputera's avatar
test3    
Ryan Karyadiputera committed
1
2
# pull official base image
FROM python:3.9.1-alpine
Ryan Karyadiputera's avatar
test  
Ryan Karyadiputera committed
3

Ryan Karyadiputera's avatar
test3    
Ryan Karyadiputera committed
4
5
# set work directory
WORKDIR /usr/src/app
Ryan Karyadiputera's avatar
test  
Ryan Karyadiputera committed
6

Ryan Karyadiputera's avatar
test3    
Ryan Karyadiputera committed
7
# set environment variables
Ryan Karyadiputera's avatar
test  
Ryan Karyadiputera committed
8
ENV PYTHONDONTWRITEBYTECODE 1
Ryan Karyadiputera's avatar
test3    
Ryan Karyadiputera committed
9
ENV PYTHONUNBUFFERED 1
Ryan Karyadiputera's avatar
test  
Ryan Karyadiputera committed
10

Ryan Karyadiputera's avatar
test3    
Ryan Karyadiputera committed
11
12
13
14
# install dependencies
RUN pip install --upgrade pip
COPY ./requirements.txt .
RUN pip install -r requirements.txt
Ryan Karyadiputera's avatar
test  
Ryan Karyadiputera committed
15

Ryan Karyadiputera's avatar
test3    
Ryan Karyadiputera committed
16
17
# copy project
COPY . .
Ryan Karyadiputera's avatar
test  
Ryan Karyadiputera committed
18

Ryan Karyadiputera's avatar
test3    
Ryan Karyadiputera committed
19
CMD [ "gunicorn", "sip.wsgi:application", "--bind", "0.0.0.0:8000" ]