Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shayneczyzewski/09dbfe0ba50821667df459bfffc1a229 to your computer and use it in GitHub Desktop.
Save shayneczyzewski/09dbfe0ba50821667df459bfffc1a229 to your computer and use it in GitHub Desktop.
wasp deploy output
$ flyctl version
flyctl v0.0.552 darwin/arm64 Commit: 159d1b04 BuildDate: 2023-05-03T20:25:05Z
$ flyctl auth whoami
shayne.czyzewski@gmail.com
πŸš€ Launching your Wasp app to Fly.io!
πŸš€ Setting up your Wasp app with Fly.io!
πŸš€ Building your Wasp app...
$ cd /Users/shayne/dev/wasp/waspc/examples/todoApp/
$ /Users/shayne/.local/share/wasp-lang/0.10.5/wasp-bin build
🐝 --- Clearing the content of the .wasp/build directory... -----------------------
βœ… --- Successfully cleared the contents of the .wasp/build directory. ------------
🐝 --- Building wasp project... ---------------------------------------------------
🐝 --- Starting npm install... ----------------------------------------------------
...Still installing npm dependencies!
[Server] > server@0.0.0 postinstall
[Server] > patch-package
[Server]
[Server] patch-package 6.5.1
[Server] Applying patches...
[Server!] No patch files found
[Server]
[Server] added 448 packages, and audited 449 packages in 14s
[Server]
[Server] 108 packages are looking for funding
[Server] run `npm fund` for details
[Server]
[Server] 1 moderate severity vulnerability
[Server]
[Server] To address all issues (including breaking changes), run:
[Server] npm audit fix --force
[Server]
[Server] Run `npm audit` for details.
...Installation going great - we'll get there soon!
[Client] added 458 packages, and audited 459 packages in 17s
[Client]
[Client] 100 packages are looking for funding
[Client] run `npm fund` for details
[Client]
[Client] found 0 vulnerabilities
[Db!] Error: P1012
[Db!]
[Db!] error: Environment variable not found: DATABASE_URL.
[Db!] --> schema.prisma:4
[Db!] |
[Db!] 3 | provider = "postgresql"
[Db!] 4 | url = env("DATABASE_URL")
[Db!] |
[Db!]
[Db!]
βœ… --- Successfully completed npm install. ----------------------------------------
🐝 --- Setting up database... -----------------------------------------------------
[Server] Prisma schema loaded from ../db/schema.prisma
[Server]
[Server] added 2 packages in 528ms
[Server]
[Server] added 2 packages, and audited 5 packages in 444ms
[Server]
[Server] found 0 vulnerabilities
[Server]
[Server] βœ” Installed the @prisma/client and prisma packages in your project
[Server]
[Server] βœ” Generated Prisma Client (4.12.0 | library) to ./node_modules/.prisma/client in 48ms
[Server] You can now start using Prisma Client in your code. Reference: https://pris.ly/d/client
[Server] ```
[Server] import { PrismaClient } from './node_modules/.prisma/client'
[Server] const prisma = new PrismaClient()
[Server] ```
[Server!] β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
[Server!] β”‚ Update available 4.12.0 -> 4.14.1 β”‚
[Server!] β”‚ Run the following to update β”‚
[Server!] β”‚ npm i --save-dev prisma@latest β”‚
[Server!] β”‚ npm i @prisma/client@latest β”‚
[Server!] β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
[Client] Prisma schema loaded from ../db/schema.prisma
[Client]
[Client] βœ” Generated Prisma Client (4.12.0 | library) to ./../web-app/node_modules/.prisma/client in 50ms
[Client] You can now start using Prisma Client in your code. Reference: https://pris.ly/d/client
[Client] ```
[Client] import { PrismaClient } from '../web-app/node_modules/.prisma/client'
[Client] const prisma = new PrismaClient()
[Client] ```
βœ… --- Database successfully set up. ----------------------------------------------
βœ… --- Your wasp project has successfully compiled. -------------------------------
βœ… --- Your wasp project has been successfully built! Check it out in the .wasp/build directory. ---
πŸš€ Setting up server app with name shayne-test2-may18-server
$ cd /Users/shayne/dev/wasp/waspc/examples/todoApp/.wasp/build
$ flyctl launch --no-deploy --name shayne-test2-may18-server --region mia
Creating app in /Users/shayne/dev/wasp/waspc/examples/todoApp/.wasp/build
Scanning source code
Detected a Dockerfile app
automatically selected personal organization: Shayne Czyzewski
App will use 'mia' region as primary
Created app 'shayne-test2-may18-server' in organization 'personal'
Admin URL: https://fly.io/apps/shayne-test2-may18-server
Hostname: shayne-test2-may18-server.fly.dev
Wrote config file fly.toml
Validating /Users/shayne/dev/wasp/waspc/examples/todoApp/.wasp/build/fly.toml
Platform: nomad
βœ“ Configuration is valid
Your app is ready! Deploy with `flyctl deploy`
$ flyctl secrets set JWT_SECRET=32e1401b3b4519a474e2567fb9dd62fbe6f9bef812c7f872f0da00442d739df1 PORT=8080 WASP_WEB_CLIENT_URL=https://shayne-test2-may18-client.fly.dev
Secrets are staged for the first deployment
πŸš€ Server setup complete!
πŸš€ Setting up client app with name shayne-test2-may18-client
$ cd /Users/shayne/dev/wasp/waspc/examples/todoApp/.wasp/build/web-app
$ flyctl launch --no-deploy --name shayne-test2-may18-client --region mia
Creating app in /Users/shayne/dev/wasp/waspc/examples/todoApp/.wasp/build/web-app
Scanning source code
Detected a NodeJS/Prisma app
automatically selected personal organization: Shayne Czyzewski
App will use 'mia' region as primary
Created app 'shayne-test2-may18-client' in organization 'personal'
Admin URL: https://fly.io/apps/shayne-test2-may18-client
Hostname: shayne-test2-may18-client.fly.dev
Wrote config file fly.toml
Validating /Users/shayne/dev/wasp/waspc/examples/todoApp/.wasp/build/web-app/fly.toml
Platform: nomad
βœ“ Configuration is valid
Your Node app is prepared for deployment. Be sure to set your listen port
to 8080 using code similar to the following:
const port = process.env.PORT || "8080";
If you need custom packages installed, or have problems with your deployment
build, you may need to edit the Dockerfile for app-specific changes. If you
need help, please post on https://community.fly.io.
Now: run 'fly deploy' to deploy your Node app.
πŸš€ Client setup complete!
πŸš€ Don't forget to create your database by running "wasp deploy fly create-db <region>".
πŸš€ Creating your DB on Fly.io!
$ flyctl postgres create --name shayne-test2-may18-db --region mia --vm-size shared-cpu-1x --initial-cluster-size 1 --volume-size 1
automatically selected personal organization: Shayne Czyzewski
Creating postgres cluster in organization personal
Creating app...
Setting secrets on app shayne-test2-may18-db...
Provisioning 1 of 1 machines with image flyio/postgres-flex:15.3@sha256:814448113018b101e900c1fb875a75f98178f0978ac0715a7638bfb8a11bb59d
Waiting for machine to start...
Machine 4d89503c419187 is created
==> Monitoring health checks
Waiting for 4d89503c419187 to become healthy (started, 0/3)
Waiting for 4d89503c419187 to become healthy (started, 0/3)
Waiting for 4d89503c419187 to become healthy (started, 2/3)
Waiting for 4d89503c419187 to become healthy (started, 2/3)
Waiting for 4d89503c419187 to become healthy (started, 3/3)
Postgres cluster shayne-test2-may18-db created
Username: postgres
Password: KG9KTradDHLVqNt
Hostname: shayne-test2-may18-db.internal
Flycast: fdaa:0:24c7:0:1::8
Proxy port: 5432
Postgres port: 5433
Connection string: postgres://postgres:KG9KTradDHLVqNt@shayne-test2-may18-db.flycast:5432
Save your credentials in a secure place -- you won't be able to see them again!
Connect to postgres
Any app within the Shayne Czyzewski organization can connect to this Postgres using the above connection string
Now that you've set up Postgres, here's what you need to understand: https://fly.io/docs/postgres/getting-started/what-you-should-know/
$ flyctl postgres attach shayne-test2-may18-db -a shayne-test2-may18-server
Checking for existing attachments
Registering attachment
Creating database
Creating user
Postgres cluster shayne-test2-may18-db is now attached to shayne-test2-may18-server
The following secret was added to shayne-test2-may18-server:
DATABASE_URL=postgres://shayne_test2_may18_server:eeXhjYUIieUbjfo@shayne-test2-may18-db.flycast:5432/shayne_test2_may18_server?sslmode=disable
Please take note of your database credentials above, as they will not be available in plaintext again. Press any key to continue.
πŸš€ Don't forget to deploy your app by running "wasp deploy fly deploy".
πŸš€ Deploying your Wasp app to Fly.io!
πŸš€ Deploying your server now...
$ cd /Users/shayne/dev/wasp/waspc/examples/todoApp/.wasp/build
$ flyctl secrets list -j
[
{
"Name": "DATABASE_URL",
"Digest": "354e3ba6b9bfe4da",
"CreatedAt": "2023-05-18T14:05:21Z"
},
{
"Name": "JWT_SECRET",
"Digest": "071bce39d47bb6f1",
"CreatedAt": "2023-05-18T14:04:51Z"
},
{
"Name": "PORT",
"Digest": "331687776d319529",
"CreatedAt": "2023-05-18T14:04:51Z"
},
{
"Name": "WASP_WEB_CLIENT_URL",
"Digest": "a71721372e207538",
"CreatedAt": "2023-05-18T14:04:51Z"
}
]
$ flyctl deploy --remote-only
==> Verifying app config
--> Verified app config
==> Building image
Waiting for remote builder fly-builder-lively-water-4687...
Remote builder fly-builder-lively-water-4687 ready
==> Creating build context
--> Creating build context done
==> Building image with Docker
--> docker host: 20.10.12 linux x86_64
Sending build context to Docker daemon 250.4kB
#1 [internal] load remote build context
#1 DONE 0.0s
#2 copy /context /
#2 DONE 0.1s
#3 [internal] load metadata for docker.io/library/node:18-alpine3.17
#3 DONE 0.1s
#4 [node 1/1] FROM docker.io/library/node:18-alpine3.17@sha256:1ccc70acda680aa4ba47f53e7c40b2d4d6892de74817128e0662d32647dd7f4d
#4 DONE 0.0s
#9 [server-builder 1/7] RUN apk add --no-cache build-base libtool autoconf automake
#9 CACHED
#5 [base 1/2] RUN apk --no-cache -U upgrade # To ensure any potential security patches are applied.
#5 CACHED
#6 [base 2/2] RUN apk add --no-cache openssl1.1-compat
#6 CACHED
#10 [server-builder 2/7] WORKDIR /app
#10 CACHED
#11 [server-builder 3/7] COPY server/ ./server/
#11 DONE 0.0s
#12 [server-builder 4/7] RUN cd server && npm install
#12 8.420
#12 8.420 > server@0.0.0 postinstall
#12 8.420 > patch-package
#12 8.420
#12 8.587 patch-package 6.5.1
#12 8.588 Applying patches...
#12 8.589 No patch files found
#12 8.606
#12 8.606 added 447 packages, and audited 448 packages in 8s
#12 8.607
#12 8.607 108 packages are looking for funding
#12 8.607 run `npm fund` for details
#12 8.614
#12 8.614 1 moderate severity vulnerability
#12 8.614
#12 8.614 To address all issues (including breaking changes), run:
#12 8.614 npm audit fix --force
#12 8.614
#12 8.614 Run `npm audit` for details.
#12 8.615 npm notice
#12 8.615 npm notice New minor version of npm available! 9.5.1 -> 9.6.7
#12 8.615 npm notice Changelog: <https://github.com/npm/cli/releases/tag/v9.6.7>
#12 8.615 npm notice Run `npm install -g npm@9.6.7` to update!
#12 8.615 npm notice
#12 DONE 8.7s
#13 [server-builder 5/7] COPY db/schema.prisma ./db/
#13 DONE 0.0s
#14 [server-builder 6/7] RUN cd server && PRISMA_CLIENT_OUTPUT_DIR=../server/node_modules/.prisma/client/ npx prisma generate --schema='../db/schema.prisma'
#14 1.625 Prisma schema loaded from ../db/schema.prisma
#14 3.865
#14 3.865 added 2 packages in 2s
#14 5.802
#14 5.802 added 2 packages, and audited 5 packages in 1s
#14 5.803
#14 5.803 found 0 vulnerabilities
#14 5.819
#14 5.819 βœ” Installed the @prisma/client and prisma packages in your project
#14 6.293
#14 6.293 βœ” Generated Prisma Client (4.12.0 | library) to ./node_modules/.prisma/client in 113ms
#14 6.293 You can now start using Prisma Client in your code. Reference: https://pris.ly/d/client
#14 6.293 ```
#14 6.293 import { PrismaClient } from './node_modules/.prisma/client'
#14 6.293 const prisma = new PrismaClient()
#14 6.293 ```
#14 DONE 6.4s
#15 [server-builder 7/7] RUN cd server && npm run build
#15 0.738
#15 0.738 > server@0.0.0 build
#15 0.738 > npx tsc
#15 0.738
#15 DONE 4.1s
#7 [server-production 1/8] RUN apk add --no-cache python3
#7 CACHED
#8 [server-production 2/8] WORKDIR /app
#8 CACHED
#16 [server-production 3/8] COPY --from=server-builder /app/server/node_modules ./server/node_modules
#16 DONE 0.9s
#17 [server-production 4/8] COPY --from=server-builder /app/server/dist ./server/dist
#17 DONE 0.0s
#18 [server-production 5/8] COPY --from=server-builder /app/server/package*.json ./server/
#18 DONE 0.1s
#19 [server-production 6/8] COPY --from=server-builder /app/server/scripts ./server/scripts
#19 DONE 0.0s
#20 [server-production 7/8] COPY db/ ./db/
#20 DONE 0.0s
#21 [server-production 8/8] WORKDIR /app/server
#21 DONE 0.0s
#22 exporting to image
#22 exporting layers
#22 exporting layers 1.5s done
#22 writing image sha256:e1c4a883725fe4e22c2cab0be5aff289104fce739501cc4c31a0e9d8f0582231 done
#22 naming to registry.fly.io/shayne-test2-may18-server:deployment-01H0QJWSWP858WGA6S4BDBANC7 done
#22 DONE 1.5s
--> Building image done
==> Pushing image to fly
The push refers to repository [registry.fly.io/shayne-test2-may18-server]
5f70bf18a086: Preparing
6ac96e494d9f: Preparing
c19b61689ebf: Preparing
b76e69377287: Preparing
a33bc5f1c75d: Preparing
168dd9798720: Preparing
3ffc81230e34: Preparing
eba66d13e5cb: Preparing
595eaa8e709a: Preparing
e083bf8b4cde: Preparing
eba66d13e5cb: Waiting
885a5d40fc11: Preparing
1b6c3782871e: Preparing
b0e46d71a47b: Preparing
f1417ff83b31: Preparing
595eaa8e709a: Waiting
168dd9798720: Waiting
3ffc81230e34: Waiting
885a5d40fc11: Waiting
1b6c3782871e: Waiting
e083bf8b4cde: Waiting
b0e46d71a47b: Waiting
f1417ff83b31: Waiting
5f70bf18a086: Mounted from shayne-test1-may18-server
6ac96e494d9f: Pushed
c19b61689ebf: Pushed
a33bc5f1c75d: Pushed
eba66d13e5cb: Mounted from shayne-test1-may18-server
3ffc81230e34: Mounted from shayne-test1-may18-server
b76e69377287: Pushed
595eaa8e709a: Mounted from shayne-test1-may18-server
e083bf8b4cde: Mounted from shayne-test1-may18-server
885a5d40fc11: Mounted from shayne-test1-may18-server
1b6c3782871e: Mounted from shayne-test1-may18-server
b0e46d71a47b: Mounted from shayne-test1-may18-server
f1417ff83b31: Mounted from shayne-test1-may18-server
168dd9798720: Pushed
deployment-01H0QJWSWP858WGA6S4BDBANC7: digest: sha256:287430bed1e05985401963a03f4410caa2032ae277315c761aa462edecd8f8da size: 3250
--> Pushing image done
image: registry.fly.io/shayne-test2-may18-server:deployment-01H0QJWSWP858WGA6S4BDBANC7
image size: 444 MB
Watch your app at https://fly.io/apps/shayne-test2-may18-server/monitoring
==> Creating release
--> release v2 created
--> You can detach the terminal anytime without stopping the deployment
==> Monitoring deployment
Logs: https://fly.io/apps/shayne-test2-may18-server/monitoring
v0 is being deployed
30fcfb9e: mia running healthy
30fcfb9e: mia running unhealthy [health checks: 1 total]
30fcfb9e: mia running healthy [health checks: 1 total, 1 passing]
--> v0 deployed successfully
Visit your newly deployed app at https://shayne-test2-may18-server.fly.dev/
πŸš€ Server has been deployed!
πŸš€ Deploying your client now...
$ cd /Users/shayne/dev/wasp/waspc/examples/todoApp/.wasp/build/web-app
πŸš€ Building web client for production...
$ npm install
up to date, audited 459 packages in 468ms
100 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
$ REACT_APP_API_URL=https://shayne-test2-may18-server.fly.dev npm run build
> todoApp@0.0.0 build
> npm run validate-env && tsc && vite build
> todoApp@0.0.0 validate-env
> node -r dotenv/config ./scripts/validate-env.mjs
πŸ” Validating environment variables...
vite v4.3.8 building for production...
transforming...
βœ“ 224 modules transformed.
rendering chunks...
computing gzip size...
build/index.html 0.74 kB β”‚ gzip: 0.40 kB
build/assets/todoLogo-7997d431.png 76.85 kB
build/assets/index-9edbbf97.css 14.68 kB β”‚ gzip: 3.36 kB
build/assets/index-658f4503.js 275.48 kB β”‚ gzip: 87.04 kB
βœ“ built in 1.11s
$ flyctl deploy --remote-only
==> Verifying app config
--> Verified app config
==> Building image
Waiting for remote builder fly-builder-lively-water-4687...
Remote builder fly-builder-lively-water-4687 ready
==> Creating build context
--> Creating build context done
==> Building image with Docker
--> docker host: 20.10.12 linux x86_64
#1 [internal] load remote build context
Sending build context to Docker daemon 58.01MB
#1 DONE 0.0s
#2 copy /context /
#2 DONE 1.8s
#3 [internal] load metadata for docker.io/pierrezemb/gostatic:latest
#3 DONE 0.1s
#4 [1/2] FROM docker.io/pierrezemb/gostatic@sha256:7e5718f98f2172f7c8dffd152ef0b203873ba889c8d838b2e730484fc71f6acd
#4 DONE 0.0s
#4 [1/2] FROM docker.io/pierrezemb/gostatic@sha256:7e5718f98f2172f7c8dffd152ef0b203873ba889c8d838b2e730484fc71f6acd
#4 CACHED
#5 [2/2] COPY ./build/ /srv/http/
#5 DONE 0.1s
#6 exporting to image
#6 exporting layers done
#6 writing image sha256:e780c423bf2ea46b6d75db34206df91ac06a6dd42dc3a18ab90c6027fcb04d8b done
#6 naming to registry.fly.io/shayne-test2-may18-client:deployment-01H0QJZAYJ7TVNQA73Z42B4Z1X done
#6 DONE 0.0s
--> Building image done
==> Pushing image to fly
The push refers to repository [registry.fly.io/shayne-test2-may18-client]
bed84d48bb3d: Preparing
f347b3d1982a: Preparing
f347b3d1982a: Mounted from shayne-test1-may18-client
bed84d48bb3d: Pushed
deployment-01H0QJZAYJ7TVNQA73Z42B4Z1X: digest: sha256:170d666c48b6e00c69d03c88d6ddda729a070bde9d72df654e381e5ac1953dbc size: 738
--> Pushing image done
image: registry.fly.io/shayne-test2-may18-client:deployment-01H0QJZAYJ7TVNQA73Z42B4Z1X
image size: 2.3 MB
Watch your app at https://fly.io/apps/shayne-test2-may18-client/monitoring
==> Creating release
--> release v2 created
--> You can detach the terminal anytime without stopping the deployment
==> Monitoring deployment
Logs: https://fly.io/apps/shayne-test2-may18-client/monitoring
v0 is being deployed
f4401618: mia running healthy
f4401618: mia running healthy [health checks: 1 total, 1 passing]
--> v0 deployed successfully
Visit your newly deployed app at https://shayne-test2-may18-client.fly.dev/
__
// \
\\_/ //
_ -(||)(')
\ \____///_____
#########[==__DEPLOYED__}
/_/
πŸš€ Client has been deployed! Your Wasp app is accessible at: https://shayne-test2-may18-client.fly.dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment