Skip to content

Commit

Permalink
Create a separate app for publisher on PostgreSQL
Browse files Browse the repository at this point in the history
  • Loading branch information
mtaylorgds committed Jan 3, 2025
1 parent 9a17d62 commit 1747177
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 0 deletions.
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ services:
- maslow.dev.gov.uk
- places-manager.dev.gov.uk
- publisher.dev.gov.uk
- publisher-on-postgresql.dev.gov.uk
- publishing-api.dev.gov.uk
- release.dev.gov.uk
- router-api.dev.gov.uk
Expand Down
4 changes: 4 additions & 0 deletions projects/publisher-on-postgresql/Makefile
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
69 changes: 69 additions & 0 deletions projects/publisher-on-postgresql/docker-compose.yml
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

0 comments on commit 1747177

Please sign in to comment.