diff --git a/README.md b/README.md index bcb126db..a956bd42 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,18 @@ You can change these to your liking. - `ENABLE_ADMIN`: the first account created is an administrator account - `DRIFT_HOME`: defaults to ~/.drift, the directory for storing the database and eventually images +## Running with pm2 + +It's easy to start Drift using [pm2](https://pm2.keymetrics.io/). +First, add `.env` files to `client/` and `server/` with thev values you want (see the above section for possible values). +Then, use the following commands to start the client and server: + +- `cd server && yarn build && pm2 start yarn --name drift-server --interpreter bash -- start` +- `cd ..` +- `cd client && yarn build && pm2 start yarn --name drift-client --interpreter bash -- start` + +You now use `pm2 ls` to see their statuses. Refer to pm2's docs or `pm2 help` for more information. + ## Current status Drift is a major work in progress. Below is a (rough) list of completed and envisioned features. If you want to help address any of them, please let me know regardless of your experience and I'll be happy to assist. diff --git a/docker-compose.yml b/docker-compose.yml index c371926e..c2613cdc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,29 +10,22 @@ services: environment: - JWT_SECRET=change_me! # use `openssl rand -hex 32` to generate a strong secret - SECRET_KEY=secret - expose: - - 3000 ports: - "3000:3000" networks: - general - healthcheck: - test: [ "CMD", "curl", "-s", "localhost:3000"] - interval: 10s - timeout: 45s - retries: 10 container_name: server client: build: context: ./client network: host args: - API_URL: http://localhost:3000 + API_URL: http://server:3000 SECRET_KEY: secret restart: unless-stopped user: 1000:1000 environment: - - API_URL=http://localhost:3000 + - API_URL=http://server:3000 - SECRET_KEY=secret ports: - "3001:3001" @@ -40,9 +33,9 @@ services: - 3001 networks: - general - depends_on: - server: - condition: service_healthy + # depends_on: + # server: + # condition: service_healthy container_name: client networks: