better wording and tidy up of init script

This commit is contained in:
Martin McKeaveney 2021-03-22 19:35:29 +00:00
parent 51506a5f42
commit 81452c3a7f
2 changed files with 11 additions and 14 deletions

View File

@ -61,9 +61,6 @@ services:
container_name: budi-redis-dev container_name: budi-redis-dev
restart: always restart: always
image: redis image: redis
environment:
- COUCHDB_PASSWORD=${COUCH_DB_PASSWORD}
- COUCHDB_USER=${COUCH_DB_USER}
ports: ports:
- "${REDIS_PORT}:6379" - "${REDIS_PORT}:6379"
volumes: volumes:

View File

@ -15,17 +15,6 @@ const Commands = {
Nuke: "nuke", Nuke: "nuke",
} }
const managementCommand = process.argv.slice(2)[0]
if (
!managementCommand ||
!Object.values(Commands).some(command => managementCommand === command)
) {
throw new Error(
"You must supply either an 'up' or 'down' commmand to manage the budibase dev env."
)
}
async function up() { async function up() {
console.log("Spinning up your budibase dev environment... 🔧✨") console.log("Spinning up your budibase dev environment... 🔧✨")
try { try {
@ -55,6 +44,17 @@ async function nuke() {
} }
} }
const managementCommand = process.argv.slice(2)[0]
if (
!managementCommand ||
!Object.values(Commands).some(command => managementCommand === command)
) {
throw new Error(
"You must supply either an 'up', 'down' or 'nuke' commmand to manage the budibase development environment."
)
}
let command let command
switch (managementCommand) { switch (managementCommand) {
case Commands.Up: case Commands.Up: