[chore] Production environment tweaks

This commit is contained in:
Peter Sykora 2019-12-04 18:38:04 +00:00
parent dc8ffb9050
commit f42e70df27
2 changed files with 9 additions and 1 deletions

View File

@ -14,7 +14,10 @@ RUN npm install --only=production
COPY . .
VOLUME /usr/src/app/data
RUN npm run db:schema
EXPOSE 3000
CMD [ ".//wait-for-mariadb.sh" ]
CMD [ "npm", "run db:schema" ]
CMD [ "npm", "start" ]

5
wait-for-mariadb.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
while ! mysqladmin ping -h"mariadb" --silent; do
sleep 1
done