Skip to content

Commit

Permalink
Update OSMCha Dockerfile and start script
Browse files Browse the repository at this point in the history
  • Loading branch information
willemarcel authored Sep 12, 2023
1 parent ce23b13 commit d653e17
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 6 additions & 6 deletions images/osmcha-web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,27 @@ ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en

WORKDIR /app
ENV BACKEND_VERSION v4.17.0
ENV BACKEND_VERSION feature/osm-server-config
RUN git clone https://github.com/willemarcel/osmcha-django .
RUN git checkout $BACKEND_VERSION
RUN git pull origin $BACKEND_VERSION
RUN pip3 install -r requirements/production.txt
RUN pip3 install -r requirements/local.txt

RUN curl -o /usr/local/bin/watchbot https://s3.amazonaws.com/watchbot-binaries/linux/v5.0.0/watchbot
RUN chmod +x /usr/local/bin/watchbot
# Replace social-auth-core by a modified version that provides OHM authentication
RUN pip3 uninstall social-auth-core
RUN pip3 install git+https://github.com/OpenHistoricalMap/social-core.git@master

# Upgrading requests to the latest version.
RUN pip3 install -U requests
RUN pip3 install certifi
RUN pip3 install django-extensions
ADD . /app

# Install decrypt-kms-env
RUN curl -sL https://github.com/mapbox/decrypt-kms-env/archive/v1.0.3.tar.gz | tar --gunzip --extract --strip-components=1 --exclude=readme.md --directory=/usr/local

ENV DJANGO_ROOT /app
ENV DJANGO_SETTINGS_MODULE config.settings.production
ENV C_FORCE_ROOT True
ENV OSMCHA_FRONTEND_VERSION v0.86.0-production

RUN echo "alias python=python3" >> ~/.bashrc
RUN echo "alias pip=pip3" >> ~/.bashrc
Expand Down
2 changes: 2 additions & 0 deletions images/osmcha-web/start.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/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

0 comments on commit d653e17

Please sign in to comment.