forked from nafees87n/codebox
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.sh
More file actions
executable file
·28 lines (24 loc) · 729 Bytes
/
start.sh
File metadata and controls
executable file
·28 lines (24 loc) · 729 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
# this bash script will perform necessary steps to run the server and executor containers
# script currently requires docker and docker-compose to be installed
# docker volume is created
docker volume create --name=userdata
clear
# check arguments
if [[ $1 = "d" ]] || [[ $1 = "D" ]]
then
docker-compose up --build # dev mode, container rebuilt to accomodate changes
elif [[ $1 = "P" ]] || [[ $1 = "p" ]]
then
docker-compose up # production mode, container started directly
else
echo -n "Select mode [P]roduction / [d]evelopment: "
read MODE
if [[ $MODE = "P" ]] || [[ $MODE = "p" ]]
then
docker-compose up
elif [[ $MODE = "D" ]] || [[ $MODE = "d" ]]
then
docker-compose up --build
fi
fi