| lombardof | 7fffafa | 2018-05-24 17:56:18 +0200 | [diff] [blame] | 1 | FROM ubuntu:16.04 |
| lombardof | fb37bca | 2018-05-03 16:20:04 +0200 | [diff] [blame] | 2 | |
| 3 | WORKDIR /usr/src/app |
| 4 | COPY . /usr/src/app |
| 5 | |
| 6 | RUN apt-get update |
| lombardof | 7fffafa | 2018-05-24 17:56:18 +0200 | [diff] [blame] | 7 | RUN apt-get install -y npm git python-pip |
| lombardof | fb37bca | 2018-05-03 16:20:04 +0200 | [diff] [blame] | 8 | RUN npm install -g bower |
| 9 | RUN ln -s /usr/bin/nodejs /usr/bin/node |
| 10 | RUN bower install --allow-root |
| 11 | RUN pip install -r requirements.txt |
| 12 | |
| 13 | |
| 14 | # delete the copy of the database inside the container (if exists) |
| 15 | RUN rm -f db.sqlite3 |
| 16 | |
| 17 | RUN python manage.py makemigrations sf_user projecthandler instancehandler vimhandler |
| 18 | RUN python manage.py migrate |
| 19 | |
| lombardof | fb37bca | 2018-05-03 16:20:04 +0200 | [diff] [blame] | 20 | |
| 21 | EXPOSE 80 |
| 22 | CMD ["python", "manage.py", "runserver", "0.0.0.0:80"] |