Add script that preps an alpine container to run the app
This commit is contained in:
parent
cbe4038a79
commit
4b9b6ef201
23
script/alpine_setup
Executable file
23
script/alpine_setup
Executable file
@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# script/alpine_setup: Adds all the system packages, directors, users, etc.
|
||||||
|
# required to run the application on Alpine
|
||||||
|
|
||||||
|
# If a command fails, exit the script
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Ensure we are in the app root directory (not the /script directory)
|
||||||
|
cd "$(dirname "${0}")/.."
|
||||||
|
|
||||||
|
APP_USER=${1}
|
||||||
|
APP_GROUP=${2}
|
||||||
|
|
||||||
|
apk update
|
||||||
|
apk upgrade
|
||||||
|
|
||||||
|
apk add bash
|
||||||
|
|
||||||
|
addgroup -g 8000 -S ${APP_GROUP}
|
||||||
|
adduser -u 8010 -D -S -G ${APP_GROUP} ${APP_USER}
|
||||||
|
|
||||||
|
echo 'gem: --no-document' > ~/.gemrc
|
Loading…
x
Reference in New Issue
Block a user