mirror of
https://github.com/Noratrieb/vps.git
synced 2026-01-16 17:45:14 +01:00
Merge branch 'main' of https://github.com/Nilstrieb/vps into main
This commit is contained in:
commit
cbee61365e
4 changed files with 18 additions and 10 deletions
|
|
@ -1,4 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
set -eu pipefail
|
||||
|
||||
./docker/setup_net.sh
|
||||
|
||||
|
|
|
|||
11
nginx/run.sh
11
nginx/run.sh
|
|
@ -1,16 +1,17 @@
|
|||
#!/usr/bin/env bash
|
||||
set -eu pipefail
|
||||
|
||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
|
||||
if [ "$STAGE" = "localhost" ] ;
|
||||
if [ "${STAGE-}" = "prod" ] ;
|
||||
then
|
||||
echo "INFO Running on localhost"
|
||||
NGINX_CONF="nginx.local.conf"
|
||||
EXTRA_ARGS="-p 80:80"
|
||||
else
|
||||
echo "INFO Running on prod"
|
||||
NGINX_CONF="nginx.conf"
|
||||
EXTRA_ARGS="-v=/etc/letsencrypt:/etc/nginx/certs -p 443:443"
|
||||
else
|
||||
echo "INFO Running on localhost"
|
||||
NGINX_CONF="nginx.local.conf"
|
||||
EXTRA_ARGS="-p 80:80"
|
||||
fi
|
||||
|
||||
if docker container inspect nginx > /dev/null 2>&1 ;
|
||||
|
|
|
|||
|
|
@ -1,12 +1,10 @@
|
|||
#!/usr/bin/env bash
|
||||
set -eu pipefail
|
||||
|
||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
|
||||
if [ "$STAGE" = "localhost" ] ;
|
||||
if [ "${STAGE-}" = "prod" ] ;
|
||||
then
|
||||
echo "INFO Running on localhost"
|
||||
CERT_VOLUME=""
|
||||
else
|
||||
echo "INFO Running on prod"
|
||||
CERT_VOLUME="\
|
||||
-v=/etc/letsencrypt:/etc/letsencrypt \
|
||||
|
|
@ -17,6 +15,9 @@ else
|
|||
-e=REGISTRY_AUTH_HTPASSWD_REALM=Realm \
|
||||
-e=REGISTRY_AUTH_HTPASSWD_PATH=/htpasswd \
|
||||
"
|
||||
else
|
||||
echo "INFO Running on localhost"
|
||||
CERT_VOLUME=""
|
||||
fi
|
||||
|
||||
if docker container inspect registry > /dev/null 2>&1 ;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
set -eu pipefail
|
||||
|
||||
# frontend
|
||||
docker run --net internal --name cors-school-frontend -d --restart=always docker.nilstrieb.dev/cors-school-frontend:1.0.0
|
||||
|
||||
|
|
@ -5,4 +7,7 @@ docker run --net internal --name cors-school-frontend -d --restart=always docker
|
|||
docker run --net internal -d --name cors-postgres -e POSTGRES_PASSWORD=hugo58hugo -e POSTGRES_DB=davinci postgres
|
||||
|
||||
# backend
|
||||
docker run --net internal -d --name cors-school-backend -e DATABASE_URL=postgres://postgres:hugo58hugo@cors-postgres/davinci -e RUST_LOG=info -e JWT_SECRET='redacted' docker.nilstrieb.dev/cors-school-backend:1.0
|
||||
docker run --net internal -d --name cors-school-backend -e DATABASE_URL=postgres://postgres:hugo58hugo@cors-postgres/davinci -e RUST_LOG=info -e JWT_SECRET='redacted' docker.nilstrieb.dev/cors-school-backend:1.0
|
||||
|
||||
# bot
|
||||
docker run --net internal -d --name cors-school-bot -v "$(pwd)/env:/.env" docker.nilstrieb.dev/cors-school-bot:1.0
|
||||
Loading…
Add table
Add a link
Reference in a new issue