-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile
36 lines (25 loc) · 917 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
FROM python:3.6
# The enviroment variable ensures that the python output is set straight
# to the terminal with out buffering it first
ENV PYTHONUNBUFFERED 1
RUN mkdir /buza-website
RUN set -ex; \
apt-get update; \
apt-get install apt-transport-https; \
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -; \
echo "deb https://dl.yarnpkg.com/debian/ stable main" >/etc/apt/sources.list.d/yarn.list; \
curl -sL https://deb.nodesource.com/setup_10.x -o nodesource_setup.sh; \
bash nodesource_setup.sh; \
apt-get update; \
apt-get install -y python3-pip yarn nodejs
WORKDIR /buza-website
# Copy the current directory contents into the container
COPY . /buza-website
RUN set -ex; \
pip install pipenv; \
yarn; \
cp -p .env.example .env;
ENV DJANGO_SETTINGS_MODULE="buza.settings_docker"
RUN pipenv install --system --deploy; \
pipenv run django-admin migrate
EXPOSE 8000