-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update containerised workflow, testing, config and docs
- Loading branch information
1 parent
08b1d46
commit 61e8462
Showing
32 changed files
with
348 additions
and
199 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,22 +1,20 @@ | ||
.DS_Store | ||
.bin | ||
.git | ||
.gitignore | ||
.bundleignore | ||
.bundle | ||
.byebug_history | ||
.rspec | ||
tmp | ||
.env | ||
.git | ||
.github | ||
.gitignore | ||
.yardoc | ||
adr | ||
config/*.key | ||
config/credentials/*.key | ||
coverage | ||
doc | ||
log | ||
test | ||
spec | ||
config/deploy | ||
node_modules | ||
public/assets | ||
public/packs | ||
public/packs-test | ||
node_modules | ||
yarn-error.log | ||
coverage/ | ||
/terraform/* | ||
|
||
.env | ||
*.log | ||
terraform-azure | ||
tmp | ||
vendor |
This file was deleted.
Oops, something went wrong.
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,11 +1,29 @@ | ||
DATABASE_NAME= | ||
DATABASE_USER=boilerplate_user | ||
DATABASE_PASSWORD= | ||
DATABASE_HOST=database | ||
NODE_ENV=development | ||
DATABASE_URL=postgres://postgres:password@localhost:5432/early_years_foundation_reform_production | ||
POSTGRES_USER= | ||
POSTGRES_PASSWORD= | ||
RAILS_ENV=development | ||
WEBPACKER_DEV_SERVER_HOST=0.0.0.0 | ||
FEEDBACK_URL= | ||
SIGNUP_URL= | ||
TRACKING_ID= | ||
# psql client | ||
# PGUSER=postgres | ||
# PGPASSWORD=password | ||
# PGHOST=localhost | ||
# PGDATABASE=early_years_foundation_reform_production | ||
|
||
CONTENTFUL_SPACE= | ||
CONTENTFUL_MANAGEMENT_TOKEN= | ||
CONTENTFUL_DELIVERY_TOKEN= | ||
CONTENTFUL_PREVIEW_TOKEN= | ||
CONTENTFUL_ENVIRONMENT= | ||
CONTENTFUL_PREVIEW= | ||
|
||
SENTRY_TOKEN= | ||
|
||
DOMAIN=localhost:3000 | ||
|
||
DEBUG=true | ||
|
||
NODE_ENV=production | ||
RAILS_ENV=production | ||
|
||
ENVIRONMENT=production | ||
|
||
RAILS_MASTER_KEY=xxxxxxxxxxxxxxxx | ||
RAILS_LOG_TO_STDOUT=true |
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 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,3 +1,16 @@ | ||
enableTelemetry: 0 | ||
|
||
nodeLinker: node-modules | ||
|
||
supportedArchitectures: | ||
cpu: | ||
- x64 | ||
- arm64 | ||
libc: | ||
- glibc | ||
- musl | ||
os: | ||
- darwin | ||
- linux | ||
|
||
yarnPath: .yarn/releases/yarn-4.0.2.cjs |
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 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,3 +1,3 @@ | ||
web: env RUBY_DEBUG_OPEN=true bin/rails server | ||
web: bin/rails server -b 0.0.0.0 -p 3000 | ||
css: yarn build:css --watch | ||
js: yarn build --watch |
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,11 +1,3 @@ | ||
#!/usr/bin/env sh | ||
#!/usr/bin/env bash | ||
|
||
if ! gem list foreman -i --silent; then | ||
echo "Installing foreman..." | ||
gem install foreman | ||
fi | ||
|
||
# Default to port 3000 if not specified | ||
export PORT="${PORT:-3000}" | ||
|
||
exec foreman start -f Procfile.dev "$@" | ||
bundle exec foreman start -f Procfile.dev |
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,14 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Builds and tags all project images | ||
# Force a rebuild using `./bin/docker-build --no-cache` | ||
# ------------------------------------------------------------------------------ | ||
set -e | ||
|
||
for env in dev test; do | ||
docker-compose \ | ||
-f docker-compose.yml \ | ||
-f docker-compose.$env.yml \ | ||
--project-name reform \ | ||
build "$@" | ||
done |
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,11 @@ | ||
#!/usr/bin/env bash | ||
# ------------------------------------------------------------------------------ | ||
set -e | ||
|
||
docker-compose \ | ||
-f docker-compose.yml \ | ||
-f docker-compose.dev.yml \ | ||
--project-name reform \ | ||
up --detach app | ||
|
||
docker attach reform_dev |
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,13 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Take down all project services. | ||
# ------------------------------------------------------------------------------ | ||
set -e | ||
|
||
for env in dev test; do | ||
docker-compose \ | ||
-f docker-compose.yml \ | ||
-f docker-compose.$env.yml \ | ||
--project-name reform \ | ||
down --remove-orphans | ||
done |
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,19 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# ------------------------------------------------------------------------------ | ||
set -e | ||
|
||
if docker container ls | grep reform_dev; then | ||
echo "Already running development container" | ||
docker exec -it reform_dev rails "$@" | ||
else | ||
echo "Starting development container" | ||
docker-compose \ | ||
-f docker-compose.yml \ | ||
-f docker-compose.dev.yml \ | ||
--project-name reform \ | ||
run \ | ||
--name reform_rails \ | ||
--rm app \ | ||
rails "$@" | ||
fi |
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,18 @@ | ||
#!/usr/bin/env bash | ||
# ------------------------------------------------------------------------------ | ||
# If the working directory is not mounted as a volume, then the test environment | ||
# RAILS_MASTER_KEY variable must be passed in. | ||
# | ||
# This behaviour is used in a GitHub workflow, however this script adds the mount | ||
# | ||
set -e | ||
|
||
docker-compose \ | ||
-f docker-compose.yml \ | ||
-f docker-compose.test.yml \ | ||
--project-name reform \ | ||
run \ | ||
--volume="$PWD:/srv" \ | ||
--name reform_rspec \ | ||
--rm app \ | ||
rspec "$@" |
Oops, something went wrong.