added APP_ENV dev or stage

This commit is contained in:
2020-07-14 16:18:21 +02:00
parent d57c6b3c06
commit ac94d2ca2f
4 changed files with 19 additions and 3 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ ARG GNAME=users
#RUN find / -group ${UID} -exec chgrp -h node {} \;
#RUN find / -user ${UID} -exec chown -h node {} \;
RUN addgroup -g ${DID} ${GNAME}
# RUN addgroup -g ${UID} ${GNAME}
# adduser -h /home/gdp -D -u 1000 gdp && \
RUN adduser -u ${UID} -G ${GNAME} -s /bin/sh -D ${UNAME}
# chown -R gdp:gdp /home/gdp
+11 -2
View File
@@ -10,5 +10,14 @@ rm -rf node_modules
echo "Npm install"
npm install
echo "Run npm dev"
npm run dev
# echo "Run npm dev"
# npm run dev
echo "APP_ENV $APP_ENV"
if [ "$APP_ENV" = "prod" ]; then
echo "Run npm prod"
npm run prod
else
echo "Run npm dev"
npm run dev
fi