Unifies directory structure in dev and prod containers

This commit is contained in:
chaptergy 2020-10-08 13:38:20 +02:00
parent 95208a50a7
commit 867fe1322b
4 changed files with 6 additions and 4 deletions

View File

@ -4,7 +4,7 @@
"knex": { "knex": {
"client": "sqlite3", "client": "sqlite3",
"connection": { "connection": {
"filename": "/app/backend/config/mydb.sqlite" "filename": "/app/config/mydb.sqlite"
}, },
"pool": { "pool": {
"min": 0, "min": 0,

View File

@ -21,7 +21,9 @@ services:
volumes: volumes:
- npm_data:/data - npm_data:/data
- le_data:/etc/letsencrypt - le_data:/etc/letsencrypt
- ..:/app - ../backend:/app
- ../frontend:/app/frontend
- ../global:/app/global
depends_on: depends_on:
- db - db
working_dir: /app working_dir: /app

View File

@ -5,7 +5,7 @@ mkdir -p /data/letsencrypt-acme-challenge
cd /app || echo cd /app || echo
if [ "$DEVELOPMENT" == "true" ]; then if [ "$DEVELOPMENT" == "true" ]; then
cd /app/backend || exit 1 cd /app || exit 1
yarn install yarn install
node --max_old_space_size=250 --abort_on_uncaught_exception node_modules/nodemon/bin/nodemon.js node --max_old_space_size=250 --abort_on_uncaught_exception node_modules/nodemon/bin/nodemon.js
else else

View File

@ -7,7 +7,7 @@ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
if hash docker-compose 2>/dev/null; then if hash docker-compose 2>/dev/null; then
cd "${DIR}/.." cd "${DIR}/.."
echo -e "${BLUE} ${CYAN}Testing Dev Stack ...${RESET}" echo -e "${BLUE} ${CYAN}Testing Dev Stack ...${RESET}"
docker-compose exec -T npm bash -c "cd /app/backend && task test" docker-compose exec -T npm bash -c "cd /app && task test"
else else
echo -e "${RED} docker-compose command is not available${RESET}" echo -e "${RED} docker-compose command is not available${RESET}"
fi fi