mirror of
https://github.com/bitnami/containers.git
synced 2026-02-19 22:17:24 +08:00
Merge branch 'sequelize-support'
This commit is contained in:
@@ -11,7 +11,7 @@ ENV PATH=/opt/bitnami/node/bin:/opt/bitnami/python/bin:$PATH \
|
||||
NODE_PATH=/opt/bitnami/node/lib/node_modules
|
||||
|
||||
RUN bitnami-pkg install express-generator-4.13.4-1 --checksum 937c865650282fa55c0e543166b95b0aab9e4cf891782cee056037697b2b64e3
|
||||
RUN npm install -g bower@1.8.0
|
||||
RUN npm install -g bower@1.8.0 sequelize-cli
|
||||
|
||||
# Install express
|
||||
RUN bitnami-pkg install express-4.14.0-1 --checksum f98a7f8e85d038bb895d1105f6a0d995810b004f78b4fc0a0299237dc5070795
|
||||
|
||||
@@ -70,6 +70,13 @@ add_database_support() {
|
||||
fi
|
||||
}
|
||||
|
||||
migrate_db() {
|
||||
if [ -f .sequelizerc ]; then
|
||||
log "Applying database migrations (sequelize db:migrate)"
|
||||
sequelize db:migrate
|
||||
fi
|
||||
}
|
||||
|
||||
log () {
|
||||
echo -e "\033[0;33m$(date "+%H:%M:%S")\033[0;37m ==> $1."
|
||||
}
|
||||
@@ -111,6 +118,8 @@ if [ "$1" == npm -a "$2" == "start" ]; then
|
||||
log "Initialization finished"
|
||||
fi
|
||||
|
||||
migrate_db
|
||||
|
||||
touch $INIT_SEM
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user