Skip to content

Commit

Permalink
copy database files to data folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Schmitt committed Feb 12, 2020
1 parent 86c96c5 commit 3491411
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ This command will pull, create, and start the container:

Without persistent volume:

```bash
```shell
docker run --detach --publish 8080:9392 -e PASSWORD="Your admin password here" --name gvm securecompliance/gvm
```
With persistent volume:
Expand Down
11 changes: 7 additions & 4 deletions scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,18 @@ echo "Redis ready."


if [ ! -d /data ]; then
echo "Create Data folder"
echo "Creating Data folder..."
mkdir /data
fi

if [ ! -d /data/database ]; then
echo "Create Database folder"
mkdir /data/database
mkdir -p /var/lib/postgresql/10
echo "Creating Database folder..."
if [ -d /var/lib/postgresql/10/main ]; then
mv /var/lib/postgresql/10/main /data/database
fi
ln -s /data/database /var/lib/postgresql/10/main
chown postgres:postgres -R /var/lib/postgresql/10/main
chown postgres:postgres -R /data/database
fi

echo "Starting PostgreSQL..."
Expand Down

0 comments on commit 3491411

Please sign in to comment.