forked from yagobski/loopback-connector-elastic-search
-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* use docker for testing actively during development * ignore docker files while npm build * renamed docker-compose.json to docker-compose.yml * set executable permissions
- Loading branch information
1 parent
78eecb4
commit ae386c4
Showing
3 changed files
with
45 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
/test | ||
/examples | ||
.idea | ||
.jshintrc | ||
.jshintrc | ||
docker-compose.json | ||
docker-entrypoint.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
## Version Selection for compose file | ||
# https://docs.docker.com/compose/compose-file/#/versioning | ||
version: '2' | ||
services: | ||
web: | ||
image: node:${NODE_VERSION} | ||
working_dir: /apps/examples | ||
entrypoint: /apps/docker-entrypoint.sh | ||
command: node server/server.js | ||
environment: | ||
DEBUG: boot:test:* | ||
ports: | ||
- "80:3000" | ||
volumes: | ||
- .:/apps | ||
depends_on: | ||
- es | ||
restart: always | ||
es: | ||
image: elasticsearch:${ES_VERSION} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
# setting up prerequisites | ||
|
||
if [ -f server/datasources.bak ]; then | ||
cp server/datasources.bak server/datasources.json | ||
else | ||
cp server/datasources.json server/datasources.bak | ||
fi | ||
if [ -f server/model-config.bak ]; then | ||
cp server/model-config.bak server/model-config.json | ||
else | ||
cp server/model-config.json server/model-config.bak | ||
fi | ||
sed -i 's/hosted\.foundcluster\.com/es/g; s/9243/9200/g' /apps/examples/server/datasources.json | ||
sed -i 's/elasticsearch-ssl/elasticsearch-plain/g' /apps/examples/server/model-config.json | ||
sed -i '21,41d; s/"requestTimeout": 30000/"requestTimeout": 30000,/' /apps/examples/server/datasources.json | ||
if [ -d node_modules ]; then | ||
rm -rf node_modules | ||
fi | ||
npm install | ||
curl -X POST http://es:9200/shakespeare | ||
exec "$@" |