-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
29 lines (21 loc) · 896 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
# Use Python
FROM python:3.6
# Arguments
ARG APP_DIR=/opt/tigerpath
# Create a new folder
RUN mkdir "$APP_DIR"
# Set working directory
WORKDIR "$APP_DIR"
# Install pipenv and python dependencies
RUN pip install pipenv
ADD Pipfile "$APP_DIR"
ADD Pipfile.lock "$APP_DIR"
RUN pipenv install
# Generate webpack stats file
RUN echo '{"status":"done","publicPath":"http://localhost:3000/","chunks":{"main":[{"name":"static/js/bundle.js","publicPath":"http://localhost:3000/static/js/bundle.js","path":"/opt/tigerpath/frontend/static/js/bundle.js"},{"name":"static/js/bundle.js.map","publicPath":"http://localhost:3000/static/js/bundle.js.map","path":"/opt/tigerpath/frontend/static/js/bundle.js.map"}]}}' > webpack-stats.dev.json
# Expose ports
EXPOSE 8000
# Add all the files
ADD . "$APP_DIR"
# Collect static files and apply migrations
RUN pipenv run python manage.py collectstatic --noinput