Skip to content

Commit 9fcc73d

Browse files
committed
Add Router API Postgres project
This will allow us to develop the application locally.
1 parent c165089 commit 9fcc73d

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

projects/router-api-postgres/Makefile

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
router-api-postgres: bundle-router-api-postgres
2+
$(GOVUK_DOCKER) run $@-lite bin/rake db:prepare
3+
$(GOVUK_DOCKER) run $@-lite env RAILS_ENV=test bin/rake db:prepare
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
version: '3.7'
2+
3+
volumes:
4+
router-api-postgres-tmp:
5+
6+
x-router-api-postgres: &router-api-postgres
7+
build:
8+
context: .
9+
dockerfile: Dockerfile.govuk-base
10+
image: router-api-postgres
11+
stdin_open: true
12+
tty: true
13+
volumes:
14+
- ${GOVUK_ROOT_DIR:-~/govuk}:/govuk:delegated
15+
- root-home:/root
16+
- router-api-postgres-tmp:/govuk/router-api-postgres/tmp
17+
working_dir: /govuk/router-api-postgres
18+
19+
services:
20+
router-api-postgres-lite: &router-api-postgres-lite
21+
<<: *router-api-postgres
22+
depends_on:
23+
- postgres-14
24+
environment:
25+
DATABASE_URL: "postgresql://postgres@postgres-14/router"
26+
TEST_DATABASE_URL: "postgresql://postgres@postgres-14/router"
27+
28+
router-api-postgres-app: &router-api-postgres-app
29+
<<: *router-api-postgres
30+
depends_on:
31+
- nginx-proxy
32+
- postgres-14
33+
environment:
34+
DATABASE_URL: "postgresql://postgres@postgres-14/router"
35+
VIRTUAL_HOST: router-api-postgres.dev.gov.uk
36+
BINDING: 0.0.0.0
37+
expose:
38+
- "3000"
39+
command: bin/rails s --restart

0 commit comments

Comments
 (0)