1
1
mirror of https://github.com/kanaka/mal.git synced 2024-11-13 01:43:50 +03:00

plpgsql: another attempt using travis user.

This commit is contained in:
Joel Martin 2016-04-29 23:12:38 -05:00
parent 67cc8a15a2
commit fa52cda6f7

View File

@ -21,9 +21,15 @@ WORKDIR /mal
# Travis runs as user ID 1001 so add that user
RUN useradd -ou 1001 -m -s /bin/bash -G sudo,postgres travis
# Enable postgres and travis users to sudo for postgres startup
RUN echo "%sudo ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers
# Allow both travis and postgres user to connect to DB as 'postgres'
RUN sed -i 's/peer$/peer map=mal/' /etc/postgresql/9.4/main/pg_hba.conf
RUN echo "mal postgres postgres" >> /etc/postgresql/9.4/main/pg_ident.conf
RUN echo "mal travis postgres" >> /etc/postgresql/9.4/main/pg_ident.conf
# Add entrypoint.sh which starts postgres then run bash/command
ADD entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]