-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build osmcha to ohm config + add env vars
- Loading branch information
1 parent
b46f555
commit e804bd6
Showing
3 changed files
with
17 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,15 @@ RUN pip3 install git+https://github.com/OpenHistoricalMap/social-core.git@master | |
RUN pip3 install -U requests | ||
RUN pip3 install certifi | ||
RUN pip3 install django-extensions | ||
# Clone and build the frontend | ||
RUN git clone [email protected]:mapbox/osmcha-frontend.git | ||
WORKDIR /app/osmcha-frontend | ||
RUN yarn | ||
RUN REACT_APP_VERSION=ohm REACT_APP_STACK=PRODUCTION PUBLIC_URL=$OSMCHA_URL npx react-scripts build | ||
RUN cp -R ./build/*.html ../osmchadjango/frontend/templates/frontend/ | ||
RUN cp ./build/* ../osmchadjango/static/ | ||
RUN cp -R ./build/static/* ../osmcha-django/osmchadjango/static | ||
|
||
ADD . /app | ||
|
||
RUN echo "alias python=python3" >> ~/.bashrc | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
python3 manage.py update_frontend | ||
python3 manage.py collectstatic --noinput | ||
python3 manage.py migrate | ||
python3 manage.py runserver 0.0.0.0:8000 |