File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -20,8 +20,10 @@ RUN PGDATA="${PGDATA//\/workspace/$HOME}" \
20
20
&& printf '#!/bin/bash\n pg_ctl -D $PGDATA -l ~/.pg_ctl/log -o "-k ~/.pg_ctl/sockets" stop\n ' > ~/.pg_ctl/bin/pg_stop \
21
21
&& chmod +x ~/.pg_ctl/bin/* \
22
22
&& printf '%s\n ' '# Auto-start PostgreSQL server' \
23
- "test ! -e \$ PGWORKSPACE && test -e ${PGDATA%/data} && mv ${PGDATA%/data} /workspace" \
24
- '[[ $(pg_ctl status | grep PID) ]] || pg_start > /dev/null' > ~/.bashrc.d/200-postgresql-launch
23
+ '(' \
24
+ "mkdir \$ PGWORKSPACE 2>/dev/null || exit 0; test -e ${PGDATA%/data} && mv ${PGDATA%/data} /workspace" \
25
+ '[[ $(pg_ctl status | grep PID) ]] || pg_start > /dev/null' \
26
+ ') & disown' > ~/.bashrc.d/200-postgresql-launch
25
27
ENV PATH="$HOME/.pg_ctl/bin:$PATH"
26
28
ENV DATABASE_URL="postgresql://gitpod@localhost"
27
29
ENV PGHOSTADDR="127.0.0.1"
You can’t perform that action at this time.
0 commit comments