Skip to content

Commit

Permalink
chore: Improve performance in dev by running Node/Yarn outside of doc…
Browse files Browse the repository at this point in the history
…ker (outline#1271)

* Improve performance in dev by running Node/Yarn outside of docker

* Transpose exposed port numbers by 100, so less likely conflict with host processes
  • Loading branch information
tommoor authored May 18, 2020
1 parent e0b33ee commit 18cf148
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
SECRET_KEY=generate_a_new_key
UTILS_SECRET=generate_a_new_key

DATABASE_URL=postgres://user:pass@postgres:5432/outline
DATABASE_URL_TEST=postgres://user:pass@postgres:5432/outline-test
REDIS_URL=redis://redis:6379
DATABASE_URL=postgres://user:pass@localhost:5532/outline
DATABASE_URL_TEST=postgres://user:pass@localhost:5532/outline-test
REDIS_URL=redis://localhost:6479

URL=http://localhost:3000
PORT=3000
Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
up:
docker-compose up -d redis postgres s3
docker-compose run --rm outline /bin/sh -c "yarn && yarn sequelize db:migrate"
docker-compose up outline
yarn install --pure-lockfile
yarn sequelize db:migrate
yarn dev

build:
docker-compose build --pull outline
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,11 @@ Outline requires the following dependencies:

In development you can quickly get an environment running using Docker by following these steps:

1. Install these dependencies if you don't already have them
1. [Docker for Desktop](https://www.docker.com)
1. [Node.js](https://nodejs.org/) (v12 LTS preferred)
1. [Yarn](https://yarnpkg.com)
1. Clone this repo
1. Install [Docker for Desktop](https://www.docker.com) if you don't already have it
1. Register a Slack app at https://api.slack.com/apps
1. Copy the file `.env.sample` to `.env`
1. Fill out the following fields:
Expand All @@ -53,7 +56,7 @@ For a self-hosted production installation there is more flexibility, but these a

1. Clone this repo and install dependencies with `yarn` or `npm install`

> Requires [Node.js, npm](https://nodejs.org/) and [yarn](https://yarnpkg.com) installed
> Requires [Node.js](https://nodejs.org/) and [yarn](https://yarnpkg.com) installed
1. Build the web app with `yarn build:webpack` or `npm run build:webpack`
1. Using the `.env.sample` as a reference, set the required variables in your production environment. The following are required as a minimum:
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ services:
redis:
image: redis
ports:
- "6380:6379"
- "6479:6379"
postgres:
image: postgres
ports:
- "5434:5432"
- "5532:5432"
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: pass
Expand Down

0 comments on commit 18cf148

Please sign in to comment.