-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create a separate app for publisher on PostgreSQL
- Loading branch information
1 parent
9a17d62
commit 1747177
Showing
3 changed files
with
74 additions
and
0 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,4 @@ | ||
publisher-on-postgresql: bundle-publisher-on-postgresql publishing-api link-checker-api | ||
$(GOVUK_DOCKER) run $@-lite bin/rake db:setup | ||
$(GOVUK_DOCKER) run $@-lite env RAILS_ENV=test bin/rake db:setup | ||
$(GOVUK_DOCKER) run $@-lite yarn |
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,69 @@ | ||
volumes: | ||
publisher-on-postgresql-tmp: | ||
publisher-on-postgresql-node-modules: | ||
|
||
x-publisher-on-postgresql: &publisher-on-postgresql | ||
build: | ||
context: . | ||
dockerfile: Dockerfile.govuk-base | ||
image: publisher-on-postgresql | ||
stdin_open: true | ||
tty: true | ||
volumes: | ||
- ${GOVUK_ROOT_DIR:-~/govuk}:/govuk:delegated | ||
- root-home:/root | ||
- publisher-on-postgresql-tmp:/govuk/publisher-on-postgresql/tmp | ||
- publisher-on-postgresql-node-modules:/govuk/publisher-on-postgresql/node_modules | ||
working_dir: /govuk/publisher-on-postgresql | ||
|
||
services: | ||
publisher-on-postgresql-lite: | ||
<<: *publisher-on-postgresql | ||
shm_size: 512mb | ||
depends_on: | ||
- publisher-on-postgresql-redis | ||
- postgres-13 | ||
environment: | ||
RAILS_ENV: "test" | ||
DATABASE_URL: "postgresql://postgres@postgres-13/publisher" | ||
TEST_DATABASE_URL: "postgresql://postgres@postgres-13/publisher_test" | ||
REDIS_URL: redis://publisher-on-postgresql-redis | ||
|
||
publisher-on-postgresql-app: &publisher-on-postgresql-app | ||
<<: *publisher-on-postgresql | ||
depends_on: | ||
- publisher-on-postgresql-redis | ||
- postgres-13 | ||
- nginx-proxy | ||
- publishing-api-app | ||
- link-checker-api-app | ||
- publisher-on-postgresql-worker | ||
- publisher-on-postgresql-css | ||
environment: | ||
RAILS_ENV: "test" | ||
DATABASE_URL: "postgresql://postgres@postgres-13/publisher-on-postgresql" | ||
REDIS_URL: redis://publisher-on-postgresql-redis | ||
VIRTUAL_HOST: publisher-on-postgresql.dev.gov.uk | ||
BINDING: 0.0.0.0 | ||
expose: | ||
- "3000" | ||
command: bin/dev web | ||
|
||
publisher-on-postgresql-css: | ||
<<: *publisher-on-postgresql | ||
command: bin/dev css | ||
|
||
publisher-on-postgresql-worker: | ||
<<: *publisher-on-postgresql | ||
depends_on: | ||
- publisher-on-postgresql-redis | ||
- postgres-13 | ||
- nginx-proxy | ||
- publishing-api-app | ||
environment: | ||
DATABASE_URL: "postgresql://postgres@postgres-13/publisher-on-postgresql" | ||
REDIS_URL: redis://publisher-on-postgresql-redis | ||
command: bin/dev worker | ||
|
||
publisher-on-postgresql-redis: | ||
image: redis |