Skip to content

Commit 9a73384

Browse files
Enhance wording in readme
1 parent 9141415 commit 9a73384

File tree

2 files changed

+30
-28
lines changed

2 files changed

+30
-28
lines changed

README.md

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# Full-stack Clojure/Script app with deployment using Kamal
22

3-
This project aims to show a setup of Clojure/Script web-application that
4-
uses PostgreSQL as a database. Also, there is a config for
5-
deployment the app with Kamal on **a single server**.
3+
This project demonstrates the setup of a Clojure/Script web application that uses PostgreSQL as its database.
4+
It also includes configuration for deploying the app with Kamal on **a single server**.
65

76
Key backend libs:
87
- Integrant
@@ -27,47 +26,49 @@ Other tools:
2726

2827
## The app
2928

30-
It's a setup for Clojure/Script application with an example API route for getting
31-
movies list and showing them on the main page.
29+
This setup provides a Clojure/Script web application with an example API route for fetching
30+
a list of movies and displaying them on the main page.
31+
32+
![App main page](/docs/app_page.png)
3233

3334
## Deploy: TL;DR
3435

35-
First deploy:
36+
First deployment:
3637

3738
```shell
38-
./kamal.sh envify --skip-push # then fill all variables in newly created .env file
39+
./kamal.sh envify --skip-push # then fill all variables in the newly created `.env` file
3940
./kamal.sh server bootstrap
4041
ssh [email protected] 'docker network create traefik'
4142
ssh [email protected] 'mkdir -p /root/letsencrypt && touch /root/letsencrypt/acme.json && chmod 600 /root/letsencrypt/acme.json'
4243
./kamal.sh setup
4344
./kamal.sh app exec 'java -jar standalone.jar migrations'
4445
```
4546

46-
Then any subsequent deploy from local machine:
47+
For subsequent deployments from the local machine:
4748

4849
```shell
4950
./kamal.sh deploy
5051
```
5152

52-
or push to `master`-branch.
53+
or push to the master branch.
5354

5455
## Deploy: step-by-step
5556

5657
### Requirements
5758

58-
Make sure you have Docker [installed](https://docs.docker.com/engine/install/) on your machine.
59+
Ensure you have Docker [installed](https://docs.docker.com/engine/install/) on your machine.
5960

60-
We are going to use predefined command to run dockerized version of Kamal,
61-
so in this case you don't need to install anything else to deploy your app.
61+
We will use a predefined command to run a dockerized version of Kamal,
62+
so you dont need to install anything else to deploy your app.
6263

6364
```shell
6465
./kamal.sh version
6566
```
6667

6768
---
6869

69-
:information_source: **Note**: _Alternatively you can install Kamal as ruby gem
70-
and use just `kamal` command instead of dockerized version:_
70+
:information_source: **Note**: _Alternatively you can install Kamal as Ruby gem
71+
and use the `kamal` command instead of dockerized version:_
7172

7273
Install [mise-en-place](https://mise.jdx.dev/getting-started.html#quickstart) (or [asdf](https://asdf-vm.com/guide/getting-started.html)),
7374
add `ruby 3.3.0` to `.tool-versions` file and run:
@@ -83,16 +84,17 @@ kamal version
8384

8485
#### Setup environment variables
8586

86-
Run command `envify` to create `.env` with all required empty variables:
87+
Run command `envify` to create a `.env` with all required empty variables:
8788

8889
```shell
8990
./kamal.sh envify --skip-push
9091
```
9192

92-
_Parameter `--skip-push` is needed to do not push `.env`-file to server._
93+
_The `--skip-push` parameter prevents the `.env` file from being pushed to the server._
94+
95+
Now, you can fill all environment variables in the .env file with actual values for deployment on the server.
96+
Here’s an example:
9397

94-
Now, you can fill all env vars in `.env`-file with actual values for deployment on a server.
95-
Let's check an example:
9698
```shell
9799
# Generated by kamal envify
98100
# DEPLOY
@@ -112,10 +114,10 @@ POSTGRES_PASSWORD=secret-db-password
112114
```
113115

114116
Notes:
115-
- `SERVER_IP` - the IP of the server you wnat to deploy tour app, you should be able to connect to it using ssh-keys.
116-
- `REGISTRY_USERNAME` and `REGISTRY_PASSWORD` - credentials for docker registry, in our case we are using `ghcr.io`, but it can be anything.
117+
- `SERVER_IP` - the IP of the server you want to deploy your app, you should be able to connect to it using ssh-keys.
118+
- `REGISTRY_USERNAME` and `REGISTRY_PASSWORD` - credentials for docker registry, in our case we are using `ghcr.io`, but it can be any registry.
117119
- `TRAEFIK_ACME_EMAIL` - email for register TLS-certificate with Let's Encrypt and Traefik.
118-
- `APP_DOMAIN` - domain of your app, should be configured to point out to `SERVER_IP`.
120+
- `APP_DOMAIN` - domain of your app, should be configured to point to `SERVER_IP`.
119121
- `clojure-kamal-example-db` - this is the name of the database container from accessories section of `deploy/config.yml` file.
120122
- We duplicated database credentials to set up database container and use `DATABASE_URL` in the app.
121123

@@ -129,37 +131,37 @@ Install Docker on a server:
129131
./kamal.sh server bootstrap
130132
```
131133

132-
Create docker network to have access to database container from the app by container name
133-
and directory for Let's Encrypt certificates:
134+
Create a Docker network for access to the database container from the app by container name
135+
and a directory for Lets Encrypt certificates:
134136

135137
```shell
136138
ssh [email protected] 'docker network create traefik'
137139
ssh [email protected] 'mkdir -p /root/letsencrypt && touch /root/letsencrypt/acme.json && chmod 600 /root/letsencrypt/acme.json'
138140
```
139141

140-
Set up Traefik, database, environment variables and run app on a server:
142+
Set up Traefik, the database, environment variables and run app on a server:
141143

142144
```shell
143145
./kamal.sh setup
144146
```
145147

146-
The app is deployed on the server, but it is not fully functioning yet, we need to run database migrations:
148+
The app is deployed on the server, but it is not fully functional yet. You need to run database migrations:
147149

148150
```shell
149151
./kamal.sh app exec 'java -jar standalone.jar migrations'
150152
```
151153

152-
Now, we the application fully deployed on the server.
154+
Now, the application is fully deployed on the server.
153155

154156
### Regular deploy
155157

156-
Then, next time for deploy the app from local machine, run:
158+
For subsequent deployments from the local machine, run:
157159

158160
```shell
159161
./kamal.sh deploy
160162
```
161163

162-
Or just push to the master, there is a GitHub Actions pipeline that does
164+
Or just push to the master branch, there is a GitHub Actions pipeline that does
163165
the deployment automatically `.github/workflows/deploy.yaml`.
164166

165167
### Setup CI for deployment

docs/app_page.png

167 KB
Loading

0 commit comments

Comments
 (0)