Open infomiho opened 11 months ago
Hey can you assign this to me ?
Hey @create-dan , sure go for it if you wish! Maybe it would be good if you presented here your plan on how you would like to approach this?
Related convo on Discord: https://discord.com/channels/686873244791210014/1159852795399249981/1159852795399249981 .
Another related convo on Discord, this one about running server without Docker but directly instead: https://discord.com/channels/686873244791210014/1171112746633400462/1171112746633400462 .
One more convo on Discord, also about running server without Docker: https://discord.com/channels/686873244791210014/1224779927505731605/1224779927505731605 .
We should write a piece about deploying Wasp to bare metal and/or with
Docker
container +docker-compose.yml
Using Caprover (self-hosted PaaS)
Deploy script
```bash #!/bin/bash set -e set -u set -o pipefail SERVER_APP=socialpostgpt-server CLIENT_APP=socialpostgpt-client CAPROVER_URL=https://captain.apps.twoducks.dev IS_BUILDING=false IS_DEPLOYING_SERVER=false IS_DEPLOYING_CLIENT=true if [ "$IS_BUILDING" = true ] ; then echo "Building server..." wasp build fi if [ ! -d ".wasp/build" ] ; then echo "Error: .wasp/build doesn't exist" exit 1 fi cd .wasp if [ "$IS_DEPLOYING_SERVER" = true ] ; then echo "Tar-ing server..." tar -czf server.tar.gz --exclude "node_modules" ./build/* echo "Deploying server..." caprover deploy -a $SERVER_APP -t ./server.tar.gz -u $CAPROVER_URL rm server.tar.gz fi if [ "$IS_DEPLOYING_CLIENT" = true ] ; then echo "Building client..." cd ./build/web-app REACT_APP_API_URL=https://$SERVER_APP.apps.twoducks.dev npm run build CLIENT_DOCKERFILE=$(cat <docker-compose.yml
Writing a
docker-compose.yml
to run a built Wasp app should be pretty straightforward: