Nai
This commit is contained in:
parent
4dd0c6986d
commit
1c546f8d05
|
@ -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 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 "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 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
|
CMD /data/dev/run-internal.sh
|
||||||
|
|
|
@ -13,6 +13,12 @@ export PLATFORM_PATH=/data/src
|
||||||
|
|
||||||
V="/data/run/virtualenv"
|
V="/data/run/virtualenv"
|
||||||
if [[ ! -e $V ]] ; then
|
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
|
mkdir -p $V
|
||||||
virtualenv -p python3 $V
|
virtualenv -p python3 $V
|
||||||
cd $V
|
cd $V
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
FROM ubuntu:18.04
|
||||||
|
|
||||||
|
WORKDIR /data
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
docker build -t kunkel/oer-worker .
|
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/bash
|
||||||
|
docker run -h oer-worker -it --rm -v $PWD/../:/data/ kunkel/oer-worker /bin/bash
|
Loading…
Reference in New Issue