forkjo/docker/s6/gogs/setup
Jean-Philippe Roemer 9cba6ff84b Volumed data setup changed to allow #1759
- Volumed subfolder now created up in the ENTRYPOINT script, this way
  they are created before S6 even starts making VOLUME.
- The subfolder will be created during VOLUME creation too as ENTRYPOINT
  script will be run before /bin/true
- SSH Keys will now be created on a single key basis not replying on the
  existence of /data/ssh folder
2015-10-12 18:46:45 +01:00

18 lines
347 B
Bash
Executable file

#!/bin/sh
if ! test -d ~git/.ssh; then
mkdir -p ~git/.ssh
chmod 700 ~git/.ssh
fi
if ! test -f ~git/.ssh/environment; then
echo "GOGS_CUSTOM=${GOGS_CUSTOM}" > ~git/.ssh/environment
chmod 600 ~git/.ssh/environment
fi
cd /app/gogs
ln -sf /data/gogs/log ./log
ln -sf /data/gogs/data ./data
chown -R git:git /data /app/gogs ~git/