Skip to content

Commit

Permalink
docker corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
Tradeface committed May 27, 2020
1 parent d5a2080 commit 6486a7c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
6 changes: 2 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt

COPY . .
RUN python3 web/manage.py migrate \
&& python3 web/manage.py loaddata dpstype \
&& python web/manage.py createsuperuser --username admin --password admin --email [email protected]
RUN make

EXPOSE 8000

CMD [ "python", "./web/manage.py runserver --noreload" ]
CMD [ "python", "./web/manage.py runserver 0.0.0.0:8000 --noreload" ]
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
init:
pip3 install -r requirements.txt
python3 web/manage.py migrate
python3 web/manage.py loaddata dpstype setting
python3 web/manage.py loaddata dpstype
python3 web/manage.py loaddata setting
python3 web/manage.py createsuperuser --username admin --password admin --email [email protected]

install:
Expand All @@ -11,4 +12,4 @@ install:
sudo systemctl start mqttdevices.service

docker:
docker build -t mqttdevices .
docker build -t mqttdevices .
2 changes: 1 addition & 1 deletion web/web/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = []
ALLOWED_HOSTS = ['*']


# Application definition
Expand Down

0 comments on commit 6486a7c

Please sign in to comment.