-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathsetup-dev.sh
More file actions
executable file
·38 lines (25 loc) · 955 Bytes
/
setup-dev.sh
File metadata and controls
executable file
·38 lines (25 loc) · 955 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
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
set -e
source .env.sh
### Cert ###
printf "\n *** Generating self-signed SSL certificate *** \n\n"
openssl req -new -newkey rsa:2048 -days 365 -nodes -x509 \
-subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=www.example.com" \
-keyout certs/server.key -out certs/server.crt
### Backend ###
printf "\n *** Running backend migrations *** \n\n"
docker compose run backend-migrate
printf "\n *** Packaging backend *** \n\n"
docker compose run backend-build
printf "\n *** Creating htpasswd file for Kibana *** \n\n"
docker compose build htpasswd
docker compose run htpasswd admin $ADMIN_PASSWORD > nginx/htpasswd
### Frontend ###
printf "\n *** Fetching npm dependencies *** \n\n"
npm install
### Start services ###
printf "\n *** Starting backend services *** \n\n"
docker compose up -d proxy-local
printf "\n *** Setup complete! *** \n\n"
echo "To start the frontend dev server, run:"
echo " npx shadow-cljs watch app"