-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify development environment setup via Docker Compose #1221
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
npm-debug.log |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,12 @@ API_URL=http://localhost:3005/api | |
FORCE_URL=https://staging.artsy.net | ||
ARTSY_URL=https://stagingapi.artsy.net | ||
SESSION_SECRET=p0s1tr0n | ||
MONGOHQ_URL=mongodb://localhost:27017/positron | ||
ELASTICSEARCH_PORT=9200 | ||
|
||
# Local development only for the below; refers to the key in docker-compose.yml | ||
ELASTICSEARCH_URL=http://elasticsearch:9200 | ||
MONGOHQ_URL=mongodb://mongodb:27017/positron | ||
|
||
[email protected] | ||
DEBUG=api,client,app | ||
SALT=$2a$10$PJrPMBadu1NPdmnshBgFbe | ||
|
@@ -34,4 +39,4 @@ INSTANT_ARTICLE_ACCESS_TOKEN=REPLACE | |
FB_PAGE_ID=REPLACE | ||
DEFAULT_PARTNER_ID=REPLACE | ||
SENTRY_PUBLIC_DSN=REPLACE | ||
SENTRY_PRIVATE_DSN=REPLACE | ||
SENTRY_PRIVATE_DSN=REPLACE |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,4 @@ dump.rdb | |
.env.ignore | ||
node_modules | ||
.vscode | ||
data |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM node:7 | ||
RUN mkdir -p /usr/src/app | ||
WORKDIR /usr/src/app | ||
COPY package.json . | ||
COPY . . | ||
RUN yarn install | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To avoid docker cache invalidation, do |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
version: '2' | ||
services: | ||
elasticsearch: | ||
image: elasticsearch:latest | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Again, lock to a specific version. |
||
ports: | ||
- "${ELASTICSEARCH_PORT}:${ELASTICSEARCH_PORT}" | ||
mongodb: | ||
image: mongo:latest | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was getting a connection error from mongo client. I might be missing something, but possibly the port for mongodb also needs to be forwarded and exposed like it is for elasticsearch?
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You should lock to a specific version. Production is running 3.0.6, so I would set it to
|
||
server: | ||
build: . | ||
command: make s | ||
ports: | ||
- "${PORT}:${PORT}" | ||
depends_on: | ||
- elasticsearch | ||
- mongodb | ||
volumes: | ||
- .:/usr/src/app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also needs to be added to
.env.example
.