README: add pm2 instructions

pull/56/head
Max Leiter 4 years ago
parent fb8f14fd98
commit 7505bb43fe
No known key found for this signature in database
GPG Key ID: A3512F2F2F17EBDA

@ -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.

@ -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:

Loading…
Cancel
Save