Merge branch 'run-script-postgres' of kemonine/docs into master
This commit is contained in:
commit
b8e2ef01ce
|
@ -14,48 +14,7 @@ If you are running your operating system from a Micro SD Card, You may wish to s
|
||||||
# Alternatively, create a directory on a USB drive
|
# Alternatively, create a directory on a USB drive
|
||||||
mkdir -p /var/postgres/data
|
mkdir -p /var/postgres/data
|
||||||
|
|
||||||
cat > /scratch/docker/postgres.sh << EOF
|
wget -O postgres.sh https://git.lollipopcloud.solutions/lollipop-docker/misc/raw/branch/master/run_postgres.sh
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
VERSION=""
|
|
||||||
|
|
||||||
ARCH=\`arch\`
|
|
||||||
|
|
||||||
# Cleanup arch/container image here.
|
|
||||||
if [ \$ARCH == "aarch64" ]
|
|
||||||
then
|
|
||||||
echo "64bit arm"
|
|
||||||
VERSION="arm64v8/postgres:latest"
|
|
||||||
else
|
|
||||||
echo "32bit arm"
|
|
||||||
VERSION="arm32v7/postgres:latest"
|
|
||||||
fi
|
|
||||||
|
|
||||||
docker pull \$VERSION
|
|
||||||
|
|
||||||
# Cleanup existing container.
|
|
||||||
docker stop postgres
|
|
||||||
docker rm postgres
|
|
||||||
|
|
||||||
# Re-run/create container with latest image.
|
|
||||||
# Don't forget to change the volume mount path
|
|
||||||
# if you changed it above.
|
|
||||||
#
|
|
||||||
# Please change user and password below to something
|
|
||||||
# approrpriate to your installation.
|
|
||||||
docker run \\
|
|
||||||
--name postgres \\
|
|
||||||
--restart unless-stopped \\
|
|
||||||
--net docker-private \\
|
|
||||||
--ip 172.30.12.12 \\
|
|
||||||
-e TZ=UTC \\
|
|
||||||
-e DEBUG=1 \\
|
|
||||||
-e POSTGRES_USER=mypostgres
|
|
||||||
-e POSTGRES_PASSWORD=test1234 \\
|
|
||||||
-v /var/postgres/data:/var/lib/postgresql/data \\
|
|
||||||
\$VERSION
|
|
||||||
EOF
|
|
||||||
|
|
||||||
chmod a+x /scratch/docker/postgres.sh
|
chmod a+x /scratch/docker/postgres.sh
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
Reference in New Issue