First you need to install the fridaybuilds_cli gem. It's a simple gem that provides authentication with fridaybuilds.com directly via your terminal.
gem install fridaybuilds_cli
Now you need to authenticate using your FridayBuilds account. Running the command below will try to connect to the FridayBuilds git server using credentials saved in your .netrc file. If the credentials are not valid, you will be given a url where you can log in. After successfully logging in, the program will save the newly generated credentials to your .netrc file.
friday login
If you don't use Ruby or just don't want to use the fridaybuilds_cli gem, you can add credentials manually to your .netrc file. To create new credentials you can visit the New Access Key page (you can find it in the user menu in the navigation bar). Click "Create Access Key", copy the new key's content field and paste it in your .netrc file.
# .netrc
machine git.fridaybuilds.com
login YOUR_EMAIL_HERE
password YOUR_ACCESS_KEY_CONTENT
Before pushing your code it's a good idea to verify your app has access to everything required to start. This could mean a database (which you can add from the Services tab), or some configuration (ENV) variables (which you can add from the Settings tab).
Navigate to your project's directory and then set up a new remote
git remote add friday https://git.fridaybuilds.com/YOUR_APP_SLUG.git
If you are working with a Procfile and want to run the migrations (or any other task) automatically when a new
release is deployed, you can add a release
command to your Procfile.
# Procfile
release: bundle exec rails db:migrate
Alternatively you can run commands on your app after deployment, via your app's Settings page.
Then you can just push your code. The build process will be triggered only when pushing a main
or master
branch
git push friday main
Congrats! Your app should be deploying now. Your app's status is visible on the upper part of any app-related page.
The first time you deploy your app, FridayBuilds will issue an SSL Certificate for your app's default domain. When that process is complete, you can move on to run any final setup for your app.
If you need to run a task or command on your app after the deployment is complete, you can do so from the relevant section in your app's Settings page.
If your app needs specific ENV variables to be set in order to work, you can add them from your app's Settings tab. Click "Reveal Config Variables" and give it a few seconds to fetch any pre-generated config variables for your app.
For Rails apps for example you might need to add RAILS_MASTER_KEY, SECRET_KEY_BASE, RAILS_ENV and RACK_ENV. If using the mysql2 gem, you will need to add a mysql database service and then edit the DATABASE_URL to update the database protocol from `mysql:` to `mysql2:`.