forked from jakearchibald/wittr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update docker compose (jakearchibald#24)
* Update docker-compose.yml to run using a volume * Add package-lock.json * Update package-lock.json * Add start script to package.json It runs npm install if node_modules folder doesn't exist then runs the serve script * Add a newline at the end of docker-compose.yml file * Update README.md * Add start.sh script and use it in docker-compose.yml * Add newline at the end of start.sh script * Small update in README.md * Update container_name in docker-compose.yml * Update package-lock.json to fix `npm ERR! code EINTEGRITY` * Update docker-compose.yml command to use start.sh script * Remove start script from package.json * Rename service name in docker-compose from witter to wittr * Remove package-lock.json * Remove start.sh, update the command in docker-compose.yml and update README.md * Update README.md, moving the running on local machine section on top * Minor grammar changes
- Loading branch information
1 parent
196c7d4
commit 28d9ac3
Showing
2 changed files
with
50 additions
and
12 deletions.
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
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,5 +1,19 @@ | ||
witter: | ||
build: . | ||
ports: | ||
- 8888:8888 | ||
- 8889:8889 | ||
version: '2.1' | ||
|
||
services: | ||
wittr: | ||
image: node:latest | ||
container_name: c-wittr | ||
command: /bin/bash -c "if [ ! -d node_modules ] ; then npm install ; fi && npm run serve" | ||
working_dir: /usr/src/app | ||
volumes: | ||
- .:/usr/src/app | ||
ports: | ||
- 8888:8888 | ||
- 8889:8889 | ||
healthcheck: | ||
test: "wget -q -O - http://localhost:8888" | ||
interval: 1s | ||
timeout: 30s | ||
retries: 300 | ||
restart: unless-stopped |