Skip to content

Commit

Permalink
Add more doc to setup development environment section
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkRunWu committed Dec 6, 2023
1 parent 67b04c9 commit 850f621
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions docs/development/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@ Only creating new database migrations requires installing the tool.

## Setup environment

Copy `.env.example` to `.env` and adjust as needed.
We used [`direnv`](direnv.net) to help setup required environment variables.
Copy `.env.example` to `.env` and adjust as needed. Then run it via docker-compose.

To run it without `docker-compose`, we recommend to use [`direnv`](https://github.com/direnv/direnv) to help setup required environment variables. Otherwise, expose `.env` variables to your system environment.

By default, the local data is stored in `data.local`.

And default domain is `http://*.localtest.me:8001` as value of PAGESHIP_HOST_PATTERN set in .env file

## Running in single site mode

```sh
Expand All @@ -38,4 +41,22 @@ Open the sites at `http://localtest.me:8000/` or `http://dev.localtest.me:8000/`
go run ./cmd/controller start
```

Setup pageship command to use `http://api.localtest.me:8001` as the API server.
Setup pageship command to use `http://api.localtest.me:8001` as the API server with your github account.

(Note: Must enter absolute path for `SSH Key file`)

```sh
go run ./cmd/pageship login

GitHub user name: <your github user name>
API server: http://api.localtest.me:8001
SSH key file: /Home/yourUsername/.ssh/id_rsa

```

If you enter incorrect info and want to restore whole process please enter command:

```sh
go run ./cmd/pageship config reset

```

0 comments on commit 850f621

Please sign in to comment.