-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.sh
48 lines (44 loc) · 1.01 KB
/
setup.sh
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Setup database host
if [ -n "$(grep database /etc/hosts)" ]
then
echo "database host already exists"
else
sudo -- sh -c -e "echo 127.0.0.1'\t'database >> /etc/hosts";
fi
# Setup server host
if [ -n "$(grep server /etc/hosts)" ]
then
echo "server host already exists"
else
sudo -- sh -c -e "echo 127.0.0.1'\t'server >> /etc/hosts";
fi
# Create .env.production.local file
cat > .env.production.local << EOF
APP_ENV=local
JWT_SECRET=PrettyShittySecret
DATABASE_HOST=database
DATABASE_PORT=5432
DATABASE_USERNAME=admin
DATABASE_PASSWORD=password
DATABASE_NAME=prod
EOF
# Create .env.development.local file
cat > .env.development.local << EOF
APP_ENV=local
JWT_SECRET=PrettyShittySecret
DATABASE_HOST=database
DATABASE_PORT=5432
DATABASE_USERNAME=admin
DATABASE_PASSWORD=password
DATABASE_NAME=dev
EOF
# Create .env.test.local file
cat > .env.test.local << EOF
APP_ENV=local
JWT_SECRET=PrettyShittySecret
DATABASE_HOST=database
DATABASE_PORT=5432
DATABASE_USERNAME=admin
DATABASE_PASSWORD=password
DATABASE_NAME=test
EOF