-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use docker to run, instead of vagrant.
- Loading branch information
Showing
11 changed files
with
64 additions
and
170 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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
# This script runs a command using node:10 against the source code in docker. | ||
# It simplifies the development process by not containerising the entire | ||
# source code and provides volumes for the home directory. | ||
|
||
SCRIPT_DIR=$(dirname "$0") | ||
SCRIPT_DIR_PARENT=$(cd "$SCRIPT_DIR" && cd ../ && pwd) | ||
|
||
docker run -it \ | ||
-u $(id -u):$(id -g) \ | ||
-v "${SCRIPT_DIR_PARENT}:/tmp/src" \ | ||
-w /tmp/src \ | ||
node:10 \ | ||
"$@" |
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,8 @@ | ||
#!/bin/bash | ||
|
||
# This script runs the server and required components. | ||
|
||
SCRIPT_DIR=$(dirname "$0") | ||
SCRIPT_DIR_PARENT=$(cd "$SCRIPT_DIR" && cd ../ && pwd) | ||
|
||
RUNAS="$(id -u):$(id -g)" docker-compose -f "$SCRIPT_DIR_PARENT/docker/docker-run-compose.yml" up |
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,21 @@ | ||
version: '3.3' | ||
services: | ||
email: | ||
image: ksokol/mailsink | ||
user: ${RUNAS} | ||
ports: | ||
- "2525:2525" | ||
web: | ||
image: node:10 | ||
user: ${RUNAS} | ||
depends_on: | ||
ports: | ||
- "3000:3000" | ||
volumes: | ||
- ../:/tmp/src | ||
environment: | ||
SMTP_HOST: email | ||
SMTP_PORT: 2500 | ||
working_dir: /tmp/src | ||
command: bash -c 'sleep 5; npm start' |
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.