File tree Expand file tree Collapse file tree 8 files changed +84
-127
lines changed Expand file tree Collapse file tree 8 files changed +84
-127
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # script/bootstrap: Resolve all dependencies that the application requires to
4
+ # run.
5
+
6
+ set -e
7
+ cd " $( dirname " $0 " ) /.."
8
+
9
+
10
+ if ! docker-compose ps -q app > /dev/null; then
11
+ echo " No server running yet, run ./script/server to launch"
12
+ exit 1
13
+ fi
Original file line number Diff line number Diff line change 1
- # See https://github.com/github/scripts-to-rule-them-all
2
- #
3
- # script/bootstrap is used solely for fulfilling dependencies of the project.
4
- #
5
- # The goal is to make sure all required dependencies are installed.
1
+ #! /bin/sh
6
2
7
- set -eu -o pipefail
8
- shopt -s failglob
3
+ # script/bootstrap: Resolve all dependencies that the application requires to run.
9
4
10
- docker-compose pull
5
+ set -e
6
+ cd " $( dirname " $0 " ) /.."
7
+
8
+
9
+ echo
10
+ echo " ==> Verifying docker and docker-compose…"
11
+
12
+ if ! [ -x " $( command -v docker) " ]; then
13
+ echo " Please install docker"
14
+ exit 1
15
+ fi
16
+
17
+ if ! [ -x " $( command -v docker-compose) " ]; then
18
+ echo " Please install docker-compose"
19
+ exit 1
20
+ fi
21
+
22
+ if ! docker info > /dev/null 2>&1 ; then
23
+ echo " Docker engine is not running, or your user does not have access to connect."
24
+ echo " Try starting Docker, adding your user to the docker group, or running this command with sudo"
25
+ exit 1
26
+ fi
Original file line number Diff line number Diff line change 1
- # See https://github.com/github/scripts-to-rule-them-all
2
- #
3
- # script/cibuild is used for your continuous integration server.
4
- # This script is typically only called from your CI server.
5
- #
6
- # You should set up any specific things for your environment here
7
- # before your tests are run. Your test are run simply by calling script/test.
1
+ #! /bin/sh
8
2
9
- set -eu -o pipefail
10
- shopt -s failglob
3
+ # script/cibuild: Build production deployment artifact
11
4
12
- scripts/test
5
+ set -e
6
+ cd " $( dirname " $0 " ) /.."
13
7
14
- docker build -t upenn/chime .
15
8
16
- # FUTURE - should the container be pushed anywhere?
9
+ script/bootstrap
10
+
11
+ echo
12
+ echo " ==> Building and tagging container…"
13
+ docker build -t codeforphilly/chime .
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
- # See https://github.com/github/scripts-to-rule-them-all
2
- #
3
- # script/server is used to start the application.
4
- #
5
- # For a web application, this might start up any extra processes
6
- # that the application requires to run in addition to itself.
7
- #
8
- # script/update should be called ahead of any application booting
9
- # to ensure that the application is up to date and can run appropriately.
1
+ #! /bin/sh
10
2
3
+ # script/server: Launch the application and any extra required processes
4
+ # locally.
11
5
12
- set -eu -o pipefail
13
- shopt -s failglob
6
+ set -e
7
+ cd " $( dirname " $0 " ) /.. "
14
8
15
- docker-compose up -d
9
+
10
+ script/bootstrap
11
+
12
+ if [ ! -f " .env" ]; then
13
+ echo
14
+ echo " ==> Initializing .env…"
15
+ cp .env.example .env
16
+ fi
17
+
18
+ echo
19
+ echo " ==> Loading .env…"
20
+ set -o allexport; source .env; set +o allexport
21
+
22
+ echo
23
+ echo " ==> Starting containers with docker-compose…"
24
+ docker-compose up -d --build
25
+
26
+ echo
27
+ echo " ==> App is now ready to go!"
28
+ echo " *Open http://localhost:${PORT} "
29
+ echo
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
- # See https://github.com/github/scripts-to-rule-them-all
2
- #
3
- # script/update is used to update the project after a fresh pull.
4
- #
5
- # If you have not worked on the project for a while,
6
- # running script/update after a pull will ensure that everything
7
- # inside the project is up to date and ready to work.
8
- #
9
- # Typically, script/bootstrap is run inside this script.
10
- # This is also a good opportunity to run database migrations
11
- # or any other things required to get the state of the app into
12
- # shape for the current version that is checked out.
1
+ #! /bin/sh
13
2
14
- set -eu -o pipefail
15
- shopt -s failglob
3
+ # script/update: Update application to run for its current checkout.
16
4
17
- docker-compose down
18
- scripts/bootstrap
5
+ set -e
6
+ cd " $( dirname " $0 " ) /.."
7
+
8
+
9
+ script/bootstrap
10
+ script/-check-docker-compose
11
+
12
+ echo
13
+ echo " ==> Rebuilding containers…"
14
+ docker-compose up -d --build
You can’t perform that action at this time.
0 commit comments