Skip to content

Commit

Permalink
Merge pull request exercism#3591 from nilbus/docker-default-port
Browse files Browse the repository at this point in the history
Provide a default port, making .env optional
  • Loading branch information
Katrina Owen authored Jul 21, 2017
2 parents 2931c88 + dba6594 commit edcb31d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 17 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ services:
- db
command: rerun -b --ignore='{**/*.{scss,css,js,coffee,erb},test/**}' 'puma -p 4567'
ports:
- "${EXTERNAL_PORT}:4567"
- "${EXTERNAL_PORT-4567}:4567"
environment:
# These will ensure that certain development commands which
# use 'psql' will also include our custom database config.
Expand Down
34 changes: 18 additions & 16 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,21 +61,11 @@ welcome to give it a shot!

## Setting up exercism.io

First, create an `.env` file in the root of your repository with
the following in it:
First, create an empty `.env` file in the root of your repository. This file
may be used to pass environment variables to the application, as documented
below. It may be empty but [must exist][required-env-file].

```
EXTERNAL_PORT=4567
```

You may also want to set up GitHub OAuth as per the instructions in
[`CONTRIBUTING.md`][], in which case you can add your GitHub OAuth
credentials, too:

```
EXERCISM_GITHUB_CLIENT_ID=your_github_oauth_client_id
EXERCISM_GITHUB_CLIENT_SECRET=your_github_oauth_client_secret
```
[required-env-file]: https://github.com/docker/compose/issues/3560

Then run:

Expand All @@ -90,8 +80,8 @@ Now your database is set up. To get the site up and running, run:

docker-compose up

If you're on Linux, your development instance of exercism.io will be running
at http://localhost:4567.
If you're Docker for Mac, or Docker for Windows, or native Linux, your
development instance of exercism.io will be running at http://localhost:4567.

Otherwise, if you're on a system using Docker Toolbox, your development
server will actually be running on your Docker Machine VM, *not* on
Expand All @@ -104,6 +94,18 @@ Suppose this command tells you that your Docker Machine VM is at
192.168.99.100. Then your development instance of exercism.io will be at
http://192.168.99.100:4567.

## Setting up OAuth

In development mode, the application presents an _Assume_ menu in the
upper-right-hand corner, allowing you to assume the role of one of several
preset users.

You may also set up GitHub OAuth as per the instructions in
[`CONTRIBUTING.md`][], in which case you can add your GitHub OAuth credentials:

EXERCISM_GITHUB_CLIENT_ID=your_github_oauth_client_id
EXERCISM_GITHUB_CLIENT_SECRET=your_github_oauth_client_secret

## Changing The Port

By default, the app will be exposed at port 4567, but you can change this
Expand Down

0 comments on commit edcb31d

Please sign in to comment.