forked from cerc-io/stack-orchestrator
Add stack for running osmosis frontend app (#673)
* osmosis FE stack * chmod * dont use 3000 * fix for neww stack format * updates * update osmosis readme * Update stack.yml * Update osmosis frontend stack to serve app * Host osmosis app static build using python server * Fix mapped ports in deployment for containers * Update instructions * Use nginx server to host files and handle page reloads * Fix typo --------- Co-authored-by: zramsay <zach@bluecollarcoding.ca> Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
This commit is contained in:
+18
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
# Check and exit if a deployment already exists (on restarts)
|
||||
if [ -d /app-builds/osmosis/build ]; then
|
||||
echo "Build already exists, remove volume to rebuild"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
yarn build:static
|
||||
|
||||
# Move build to app-builds
|
||||
mkdir -p /app-builds/osmosis
|
||||
cp -r ./out /app-builds/osmosis/build
|
||||
@@ -0,0 +1,16 @@
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name _;
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/osmosis/build;
|
||||
index index.html index.htm index.nginx-debian.html;
|
||||
|
||||
# First attempt to serve request as file, then as html,
|
||||
# then as directory, then fall back to displaying a 404.
|
||||
try_files $uri $uri.html $uri/ /index.html =404;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user