Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove shipnix from docs #1870

Merged
merged 3 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions Guide/deployment.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -148,20 +148,6 @@ deploy-to-nixos ihp-app

This will connect to the server via SSH and apply the NixOS configuration to the server.

## Deploying with Shipnix

Shipnix is a service for deploying NixOS web servers on DigitalOcean with first-class support for IHP.

Generating a base NixOS configuration for your specific project, Shipnix provides full freedom to configure with ease of use.

### Account Setup

Register a new account on [shipnix.io](https://shipnix.io) and follow the instructions to connect to your DigitalOcean account and upload a NixOS image to it. This one-time process takes about 10 minutes.

### Creating a new project

Provisioning a new IHP project is straightforward with the IHP starter. Read [the IHP starter guide](https://docs.shipnix.io/starters/ihp/) to find out how to set domains, enable https with LetsEncrypt and other common usecases.

## Deploying with Docker

Deploying IHP with docker is a good choice for a professional production setup.
Expand Down
Binary file removed Guide/images/first-project/shipnix-account-setup.png
Binary file not shown.
Binary file not shown.
Binary file removed Guide/images/first-project/shipnix-create-server.png
Binary file not shown.
Binary file not shown.
Binary file removed Guide/images/first-project/shipnix-deploy-1.png
Binary file not shown.
Binary file removed Guide/images/first-project/shipnix-deploy-2.png
Binary file not shown.
Binary file removed Guide/images/first-project/shipnix-deployment-2.png
Binary file not shown.
Binary file removed Guide/images/first-project/shipnix-public-ip.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed Guide/images/first-project/shipnix-signup.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
149 changes: 0 additions & 149 deletions Guide/your-first-project.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -1056,154 +1056,6 @@ That's it already. Taking a look at our post, we can see that the newest comment

![Post with ordered comments](images/first-project/post_with_ordered_comments.png)

## 7. Shipping it to the internet

The IHP community is full of digital builders and makers. So this guide would be incomplete without you shipping it to production :)

You might feel the blog is still incomplete or not ready for production, but we need to train your release muscles, so it's good to go from our side.

### Git

Before we can put it live, we need to create a git repository.

Run these commands to initialize a git repository and commit your current progress:

```bash
git init
git add .
git commit -am "Initial project setup"
```

### Pushing to GitHub

Next we need to push it to GitHub. Open GitHub and [click on New Repository](https://github.com/new).

![New Repo](images/first-project/github-new-repo.png)

Enter a repository name. We're going to use `ihp-blog`. To keep it simple we're chosing to create a public repository.

![New Repo](images/first-project/github-new-repo-2.png)

All right? Click `Create repository`.

Our repository is ready. Copy the GitHub push commands and run them in your terminal:

![Git Push](images/first-project/github-push.png)

```bash
git remote add origin [email protected]:mpscholten/ihp-blog.git
git branch -M main
git push -u origin main
```

After this you'll see your files in GitHub:

![Git Push](images/first-project/github-pushed.png)

### Login to Shipnix

For deployment we're going to use Shipnix. Open [shipnix.io](https://shipnix.io) and click on `Register`:

![Shipnix Sign Up](images/first-project/shipnix-signup.png)

Click on `Continue with GitHub` to connect your GitHub account with Shipnix for login.

Go to the Shipnix **Account settings**.

Make sure you enable **`Github repository actions`**. This makes it simpler to hook the repository up with Shipnix.

![Shipnix Sign Up](images/first-project/shipnix-repository-actions.png)

After clicking `Enable Github repo actions`, Github will prompt you about the permissions. You can accept these settings and move on.

![Shipnix Sign Up](images/first-project/shipnix-repository-settings.webp)

Next, you want to setup your account and connect Shipnix with your DigitalOcean account.

When all required steps are finished, DigitalOcean needs about 10 minutes to processs your NixOS image. This is a one-time thing.

![Shipnix Sign Up](images/first-project/shipnix-wait-processing.png)

### Provision a server

Now that Shipnix is setup, you can click the `Create New Server` button

![Shipnix "Create New Server" button](images/first-project/shipnix-create-new-button.png)

This time, we have already created the project, so we need to use the `Load existing code` starter.

We don't use the `IHP` starter in this example because the project has already been created.

![Shipnix Select starter](images/first-project/shipnix-select-starter.png)

Let's name the server `ihp-blog`.

We can skip SSH keys for now unless you have some ready on the list.

![Shipnix Create Server](images/first-project/shipnix-starter-form-1.png)

Fill out the required fields and click the `Create Server` button.

![Shipnix Create Server](images/first-project/shipnix-starter-form-2.png)

You will see console output on the screen until provisioning is finished.

![Shipnix Create Server](images/first-project/shipnix-creating-server.png)

### Make project Shipnix compatible

Now that you have provisioned the server, you can select the `IHP` starter.

Also click the `No` option, since you do not yet have the Shipnix configuration required.

![Shipnix Create Server](images/first-project/shipnix-select-preset.png)

Now you will wait for Shipnix to prepare your environment for IHP.

![Shipnix Create Server](images/first-project/shipnix-select-preset-2.png)

Next you will get some instructions to go into your current project and make it Shipnix compatible.

![Shipnix Create Server](images/first-project/shipnix-shipnixify-project-1.png)

Paste in the "Shipnixifier script" that appears in the instructions. A `nixos` folder, a `flake.nix` and a `flake.lock` file will be added to your project.

![Shipnix Create Server](images/first-project/shipnix-shipnixify-project-2.png)

Also remember to run the last code snipppet provided in the instructions to save the changes:

```bash
git add nixos flake.nix flake.lock
git commit -m "Project shipnixified"
git push
```

### Deploy

Now that your project is compatible with Shipnix, you can go **Next** and select your Github repository.

![Shipnix Create Server](images/first-project/shipnix-select-repository.png)

The defaults are good for this project. Just click `Deploy` to finish.

![Shipnix Create Server](images/first-project/shipnix-deploy-1.png)

The deployment is now starting. It provisions your database, compiles and hosts the IHP project. This will take some minutes the first time.

![Shipnix Create Server](images/first-project/shipnix-deploy-2.png)

Go to your server dashboard and find the **Public IP** address.

![Shipnix Create Server](images/first-project/shipnix-public-ip.png)

Copy and paste it in your browser, and you should see your application on the web 🙂

![Deployment Started](images/first-project/ihp-cloud-deployment-4.png)

**Congratulations!** You just shipped your first haskell application to production 🚀

You can read the guide about adding domain names in the [Shipnix docs](https://docs.shipnix.io/servers/add-domain/)

We hope you enjoyed the journey so far! Tell us [on twitter](https://twitter.com/digitallyinduce) or [celebrate your first haskell app in our slack community](https://ihp.digitallyinduced.com/Slack)! :)

## Have Fun!
Expand All @@ -1213,6 +1065,5 @@ You now understand enough of IHP and Haskell to be dangerous. The best way to co
- [Leave a Star on the IHP-GitHub repo](https://github.com/digitallyinduced/ihp) and join the IHP community to work on the future of typesafe, FP-based software development.
- [To stay in the loop, subscribe to the IHP release emails.](https://ihp.digitallyinduced.com/MailingList)
- Questions, or need help with Haskell type errors? Join our Slack: [Join IHP Slack](https://ihp.digitallyinduced.com/Slack)
- Want to put your IHP app online? [Check out Shipnix](https://shipnix.io/). It will take a few clicks and your app is online in two minutes :)

_Good to know for playing with IHP: When you want to delete a project just delete the project directory and it's gone._
Loading