master
Julian M. Kunkel 2018-05-06 11:41:40 +01:00
parent 4dd0c6986d
commit 1c546f8d05
5 changed files with 15 additions and 7 deletions

View File

@ -15,12 +15,5 @@ RUN ln -s /data/dev/apache-local.conf /etc/apache2/sites-enabled/
RUN sed -i "s#data_directory = '.*'#data_directory = '/data/run/postgres'#" /etc/postgresql/10/main/postgresql.conf
RUN echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/10/main/pg_hba.conf
RUN echo "listen_addresses='*'" >> /etc/postgresql/10/main/postgresql.conf
RUN /etc/init.d/postgresql restart
RUN sudo -u postgres psql -c "CREATE USER hoou WITH PASSWORD 'hoohoohoo123';"
RUN sudo -u postgres psql -c "CREATE DATABASE hoou;"
RUN sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE hoou to hoou;"
# psql -h localhost -U hoou hoou # should work
CMD /data/dev/run-internal.sh

View File

@ -13,6 +13,12 @@ export PLATFORM_PATH=/data/src
V="/data/run/virtualenv"
if [[ ! -e $V ]] ; then
sudo -u postgres psql -c "CREATE USER hoou WITH PASSWORD 'hoohoohoo123';"
sudo -u postgres psql -c "CREATE DATABASE hoou;"
sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE hoou to hoou;"
# psql -h localhost -U hoou hoou # should work
mkdir -p $V
virtualenv -p python3 $V
cd $V

View File

@ -0,0 +1,4 @@
FROM ubuntu:18.04
WORKDIR /data

View File

@ -0,0 +1,3 @@
#!/bin/bash
docker build -t kunkel/oer-worker .

View File

@ -0,0 +1,2 @@
#!/bin/bash
docker run -h oer-worker -it --rm -v $PWD/../:/data/ kunkel/oer-worker /bin/bash