diff --git a/docs/development/getting-started.md b/docs/development/getting-started.md index 744ae78..4d915e3 100644 --- a/docs/development/getting-started.md +++ b/docs/development/getting-started.md @@ -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`](../../docker-compose.yaml). + +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 @@ -34,8 +37,34 @@ Open the sites at `http://localtest.me:8000/` or `http://dev.localtest.me:8000/` ## Running in managed sites mode +method 1: Run with docker-compose + +```sh +docker-compose up -d +``` + +method 2: Run with go command + ```sh 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: +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 + +```