53 lines
1.2 KiB
Bash
Executable File
53 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
up () {
|
|
docker run \
|
|
--detach \
|
|
--restart unless-stopped \
|
|
--name merginmaps-server \
|
|
--env-file $HOME/scripts-private/lech/merginmaps.env \
|
|
--user 901:999 \
|
|
--volume /mammoth/merginmaps/projects:/data:rw \
|
|
--network pew-net \
|
|
lutraconsulting/merginmaps-backend:2023.6.1
|
|
|
|
docker run \
|
|
--detach \
|
|
--restart unless-stopped \
|
|
--name merginmaps-web \
|
|
--network pew-net \
|
|
lutraconsulting/merginmaps-frontend:2023.6.1
|
|
|
|
docker run \
|
|
--detach \
|
|
--restart unless-stopped \
|
|
--name merginmaps-pg \
|
|
--env POSTGRES_USER=merginmaps \
|
|
--env POSTGRES_PASSWORD=merginmaps \
|
|
--volume /mammoth/merginmaps/db:/var/lib/postgresql/data:rw \
|
|
--network pew-net \
|
|
postgres:14
|
|
|
|
docker run \
|
|
--detach \
|
|
--restart unless-stopped \
|
|
--name merginmaps-redis \
|
|
--network pew-net \
|
|
redis
|
|
}
|
|
|
|
down () {
|
|
docker stop merginmaps-server || true
|
|
docker rm merginmaps-server || true
|
|
docker stop merginmaps-web || true
|
|
docker rm merginmaps-web || true
|
|
docker stop merginmaps-pg || true
|
|
docker rm merginmaps-pg || true
|
|
docker stop merginmaps-redis || true
|
|
docker rm merginmaps-redis || true
|
|
}
|
|
|
|
$@
|