(add): Docker deployments
This commit is contained in:
Executable
+8
@@ -0,0 +1,8 @@
|
||||
# docker compose build
|
||||
source ../../version.env
|
||||
docker image tag dbob16/tam-client:latest dbob16/tam-client:${TAM_VERSION}
|
||||
mkdir -p dist/images
|
||||
docker image save dbob16/tam-client:${TAM_VERSION} | gzip > dist/images/tam-client-${TAM_VERSION}.tar.gz
|
||||
echo "TAM_VERSION=${TAM_VERSION}" > dist/prod.env
|
||||
echo "HOST=127.0.0.1" >> dist/prod.env
|
||||
echo "PORT=3000" >> dist/prod.env
|
||||
@@ -0,0 +1,9 @@
|
||||
services:
|
||||
tam-client:
|
||||
build: ../../../client/.
|
||||
image: dbob16/tam-client:latest
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "127.0.0.1:3000:3000"
|
||||
volumes:
|
||||
- "./data:/data:Z"
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
source ./prod.env
|
||||
|
||||
if [ -x "$(command -v docker)" ]; then
|
||||
docker run -d --name tam-client --network host --env-file ./prod.env -v tam-data:/data --restart unless-stopped dbob16/tam-client:${TAM_VERSION}
|
||||
elif [ -x "$(command -v podman)" ]; then
|
||||
podman run -d --name tam-client --network host --env-file ./prod.env -v tam-data:/data --restart unless-stopped dbob16/tam-client:${TAM_VERSION}
|
||||
fi
|
||||
Reference in New Issue
Block a user