Skip to content

Creating a Stack without the UI? #1296

Answered by casperisfine
Mctalian asked this question in Q&A
Discussion options

You must be logged in to vote

I you just wish to bulk create stacks on your inatance with a script, you can use bin/rails runner <your-ruby-script>.

You need some basic Ruby and Rails knowledge. You can look at the seeds.rb script for inspiration:

Stack.create!(
repository: Repository.find_or_create_by(
name: Faker::Internet.domain_name.parameterize,
owner: Faker::Company.name.parameterize
),
branch: "main",
deploy_url: "https://#{Faker::Internet.domain_name.parameterize}.#{Faker::Internet.domain_suffix}/",

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by casperisfine
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants