Complete Docker updates to py3.6

parent 036a7b71
Pipeline #762 passed with stage
in 1 minute and 17 seconds
FROM python:2.7
FROM python:3.6
ENV PYTHONUNBUFFERED 1
# HEALTHCHECK CMD curl --fail http://localhost:8000/ || exit 1
RUN mkdir /go
WORKDIR /go
ADD requirements.txt /go/
RUN apt-get update
RUN apt-get install git-all -y
RUN apt-get install python2.7-dev -y
RUN apt-get install libsasl2-dev -y
RUN apt-get install libldap2-dev -y
RUN apt-get install netcat -y
RUN apt-get install
RUN mkdir /go
WORKDIR /go
ADD requirements.txt /go/
RUN pip install -r requirements.txt
ADD . /go/
......@@ -16,12 +16,10 @@ services:
- email_domain=@masonlive.gmu.edu
- cas_url=https://cas.srct.gmu.edu/
- superuser=dhaynes3
# - SECRET_KEY=much-secret
- DB_NAME=go
- DB_USER=go
- DB_PASSWORD=go
- DB_HOST=db
- PIWIK_SITE_ID=
- PIWIK_URL=
- EMAIL_HOST=
- EMAIL_PORT=
......
# export SECRET_KEY=$(dd if=/dev/urandom count=100 | tr -dc "A-Za-z0-9" | fold -w 60 | head -n1 2>/dev/null)
until nc -z db 3306; do
echo "waiting for database to start..."
sleep 1
done
cp go/settings/settings.docker.py.template go/settings/settings.py
cp go/settings/secret.docker.py.template go/settings/secret.py
export SECRET_KEY=$(dd if=/dev/urandom count=100 | tr -dc "A-Za-z0-9" | fold -w 60 | head -n1 2>/dev/null)
python go/manage.py flush --no-input
python go/manage.py makemigrations
python go/manage.py makemigrations go
python go/manage.py flush --no-input
python go/manage.py makemigrations
python go/manage.py makemigrations go
python go/manage.py migrate
python go/manage.py createsuperuser --noinput --username=$superuser --email=$superuser$email_domain
python go/manage.py runserver 0.0.0.0:8000
\ No newline at end of file
python go/manage.py runserver 0.0.0.0:8000
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment