-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathstage.sh
More file actions
executable file
·37 lines (26 loc) · 775 Bytes
/
stage.sh
File metadata and controls
executable file
·37 lines (26 loc) · 775 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
#!/bin/bash
# docker cheatsheet
# -------------------------------------
# docker container ls --all
# docker build -t <YOUR_USER_NAME>/myfirstapp .
# docker run --name=<IMAGE-NAME> -d -v <ABS-PATH>:<VIRTUAL-PATH> -p 5000:80 <IMAGE-NAME>
# docker restart <CONTAINER-NAME>
# docker stop <CONTAINER-NAME>
cd frontend
# remove previous
rm -R build
npm run build
# delete existing stage assets
rm -Rf ../backend/templates
rm -Rf ../backend/build
# copy and overwrite existring files
yes | cp -rf build ../backend/
cd ../backend/
NAME=reflask
USER=fliptopbox
ABSPATH=`pwd`
# clean up docker, rebuild, run (in foreground)
yes | docker container prune
# docker build -t $USER/$NAME .
docker build -t $NAME .
docker run --name=$NAME -v $ABSPATH/db:/app/db -p 5000:80 $NAME