alternate way to install pyenv

This commit is contained in:
Ed Chalstrey 2022-02-11 15:53:11 +00:00
parent 40fc5e4c89
commit 8f8bd934d7

View File

@ -6,7 +6,14 @@ apt-get install -y postgresql-contrib libpq-dev postgis
apt-get install -y postgresql-13-postgis-3 apt-get install -y postgresql-13-postgis-3
apt-get install -y gdal-bin libspatialindex-dev libgeos-dev libproj-dev apt-get install -y gdal-bin libspatialindex-dev libgeos-dev libproj-dev
apt-get install -y python3 python3-pip python3-dev python3-venv apt-get install -y python3 python3-pip python3-dev
# Install pyenv (for some reason installing with apt-get didn't work in docker)
apt-get install -y curl git
echo export PATH="~/.pyenv/bin:$PATH" >> ~/.bashrc
eval "$(pyenv init -)" >> ~/.bashrc
eval "$(pyenv virtualenv-init -)" >> ~/.bashrc
source ~/.bashrc
psql -d colouringlondon -U dockeruser -c "SELECT 1 FROM pg_user WHERE usename = 'dockeruser';" | grep -q 1 || psql -d colouringlondon -U dockeruser -c "CREATE ROLE dockeruser SUPERUSER LOGIN PASSWORD 'postgres';" psql -d colouringlondon -U dockeruser -c "SELECT 1 FROM pg_user WHERE usename = 'dockeruser';" | grep -q 1 || psql -d colouringlondon -U dockeruser -c "CREATE ROLE dockeruser SUPERUSER LOGIN PASSWORD 'postgres';"
psql -d colouringlondon -U dockeruser -c "SELECT 1 FROM pg_database WHERE datname = 'colouringlondon';" | grep -q 1 || -u postgres createdb -E UTF8 -T template0 --locale=en_US.utf8 -O dockeruser colouringlondon psql -d colouringlondon -U dockeruser -c "SELECT 1 FROM pg_database WHERE datname = 'colouringlondon';" | grep -q 1 || -u postgres createdb -E UTF8 -T template0 --locale=en_US.utf8 -O dockeruser colouringlondon