Skip to content

Commit

Permalink
Update readme demo pics
Browse files Browse the repository at this point in the history
  • Loading branch information
MightyMoud committed Oct 19, 2024
1 parent c9876b3 commit 366222a
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 16 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
Bare metal to production ready in mins; imagine fly.io on your VPS

<div>
<img width="500px" src="/demo/imgs/hero.png">
<img width="600px" src="/demo/imgs/hero.png">
</div>

![GitHub](https://img.shields.io/github/license/mightymoud/sidekick)
Expand Down Expand Up @@ -57,7 +57,7 @@ That's it!
### VPS Setup

<div align="center" >
<img width="500px" src="/demo/imgs/init.png">
<img width="600px" src="/demo/imgs/init.png">
</div>

First you need to setup your VPS. To do this you need to run:
Expand Down Expand Up @@ -110,7 +110,7 @@ Read more details about flags and other options for this command [on the docs](h
### Launch a new application

<div align="center" >
<img width="500px" src="/demo/imgs/launch.png">
<img width="600px" src="/demo/imgs/launch.png">
</div>

In your application folder, make sure you have a working `Dockerfile` that you can build and run. Also make sure you know at which port your app is expecting to receive traffic.
Expand Down Expand Up @@ -143,7 +143,7 @@ Should take around 2 more mins to be able to visit your application live on the
### Deploy a new version

<div align="center" >
<img width="500px" src="/demo/imgs/deploy.png">
<img width="600px" src="/demo/imgs/deploy.png">
</div>
With your application deployed, it's super simple to deploy a new version.

Expand All @@ -169,7 +169,7 @@ This command will also do a couple of things behind the scenes. You can check th
### Deploy a preview environment/app

<div align="center" >
<img width="500px" src="/demo/imgs/preview.png">
<img width="600px" src="/demo/imgs/preview.png">
</div>
Sidekick also allows you to deploy preview apps at any point from your application. Preview apps are attached to your commit hash and require a clean git tree before you can initiate them.
Once you have a clean git tree, you can run the following command to deploy a preview app:
Expand Down
41 changes: 30 additions & 11 deletions cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,11 @@ var initCmd = &cobra.Command{
if sessionErr != nil {
hasSidekickUser = false
} else {
if <-outChan != "0" {
hasSidekickUser = true
select {
case output := <-outChan:
if output != "0" {
hasSidekickUser = true
}
}
}
if !hasSidekickUser && loggedInUser == "root" {
Expand Down Expand Up @@ -198,19 +201,27 @@ var initCmd = &cobra.Command{
log.Fatal("issue with checking age")
}

if <-outCh == "1" {
ageSetup = true
select {
case output := <-outCh:
if output == "1" {
ageSetup = true
}
break
}
if !ageSetup {
ch, _, sessionErr := utils.RunCommand(sidekickSshClient, "mkdir -p $HOME/.config/sops/age/ && age-keygen -o $HOME/.config/sops/age/keys.txt 2>&1 ")
if sessionErr != nil {
stage1Spinner.Fail(utils.SetupStage.SpinnerFailMessage)
panic(sessionErr)
}
if strings.HasPrefix(<-ch, "Public key") {
publicKey := strings.Split(<-ch, " ")[2:3]
viper.Set("publicKey", publicKey[0])
select {
case output := <-ch:
if strings.HasPrefix(output, "Public key") {
publicKey := strings.Split(output, " ")[2:3]
viper.Set("publicKey", publicKey[0])
}
}

}
stage1Spinner.Success(utils.SetupStage.SpinnerSuccessMessage)

Expand All @@ -221,8 +232,12 @@ var initCmd = &cobra.Command{
log.Fatal("Issue checking Docker")
}

if <-dockOutCh == "1" {
dockerReady = true
select {
case output := <-dockOutCh:
if output == "1" {
dockerReady = true
}
break
}
if !dockerReady {
if err := utils.RunStage(sidekickSshClient, utils.DockerStage); err != nil {
Expand All @@ -239,8 +254,12 @@ var initCmd = &cobra.Command{
log.Fatal("Issue with checking folder traefik")
}

if <-trOutCh == "1" {
traefikSetup = true
select {
case output := <-trOutCh:
if output == "1" {
traefikSetup = true
}
break
}
traefikStage := utils.GetTraefikStage(certEmail)
if !traefikSetup {
Expand Down
Binary file modified demo/imgs/deploy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/imgs/hero.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/imgs/init.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/imgs/launch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/imgs/preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 366222a

Please sign in to comment.