fix merge conflict

This commit is contained in:
Cassie Tarakajian 2017-11-01 17:15:44 -04:00
commit cdf7a41bf9
6 changed files with 33215 additions and 6 deletions

View file

@ -38,7 +38,8 @@
{ "ignorePureComponents": true { "ignorePureComponents": true
}], }],
"class-methods-use-this": 0, "class-methods-use-this": 0,
"react/jsx-no-bind": [2, {"allowBind": true, "allowArrowFunctions": true}] "react/jsx-no-bind": [2, {"allowBind": true, "allowArrowFunctions": true}],
"no-return-assign": [2, "except-parens"]
}, },
"plugins": [ "plugins": [
"react", "jsx-a11y", "import" "react", "jsx-a11y", "import"

18
Dockerfile Normal file
View file

@ -0,0 +1,18 @@
FROM node:6.11.2
ENV APP_HOME=/opt/node/app \
TERM=xterm
# Copy in the project files and set as working directory
ADD . $APP_HOME
WORKDIR $APP_HOME
# Install node modules
RUN git submodule init && \
yarn install
# For development, mark the directory as a mount override point
VOLUME $APP_HOME
# Expose default server port
EXPOSE 8000

View file

@ -38,6 +38,33 @@ Please refer to [this gist](https://gist.github.com/andrewn/953ffd5cb17ac2634dc9
The automatic redirection to HTTPS is turned off by default in development. If you need to test this behavior, put `FORCE_TO_HTTPS=true` in your `.env` file. The automatic redirection to HTTPS is turned off by default in development. If you need to test this behavior, put `FORCE_TO_HTTPS=true` in your `.env` file.
## Development Installation (using Docker)
Using Docker, you can have a complete, consistent development environment
without having to manually install dependencies such as Node, Mongo, etc. It
also helps isolate these dependencies and their data from other projects that
you may have on the same computer that use different/conflicting versions, etc.
1. Install Docker for your operating system
* Mac: https://www.docker.com/docker-mac
* Windows: https://www.docker.com/docker-windows
2. Clone this repostory and cd into it
3. `$ docker-compose build`
4. `$ docker-compose run --rm server yarn run fetch-examples`
Now, anytime you wish to start the server with its dependencies, you can run:
5. `$ docker-compose up`
6. Navigate to [http://localhost:8000](http://localhost:8000) in your browser
To open a terminal/shell in the running Docker server (i.e. after `docker-compose up` has been run):
7. `$ docker-compose exec server bash -l`
If you don't have the full server environment running, you can launch a one-off container instance (and have it automatically deleted after you're done using it):
8. `$ docker-compose run server --rm bash -l`
## Production Installation ## Production Installation
1. Clone this repostory and `cd` into it 1. Clone this repostory and `cd` into it
2. `$ git submodule init` 2. `$ git submodule init`

25
docker-compose.yml Normal file
View file

@ -0,0 +1,25 @@
version: '2'
services:
mongo:
image: mongo:3.4.7
server:
build: .
command: yarn start
environment:
- API_URL=/api
- MONGO_URL=mongodb://mongo:27017/p5js-web-editor
- PORT=8000
- SESSION_SECRET=override_in_dotenv
- AWS_ACCESS_KEY=override_in_dotenv
- AWS_SECRET_KEY=override_in_dotenv
- AWS_REGION=override_in_dotenv
- S3_BUCKET=override_in_dotenv
- GITHUB_ID=override_in_dotenv
- GITHUB_SECRET=override_in_dotenv
volumes:
- .:/opt/node/app
- /opt/node/app/node_modules
ports:
- '8000:8000'
depends_on:
- mongo

25481
package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

7657
yarn.lock Normal file

File diff suppressed because it is too large Load diff