Skip to content

Commit 7851964

Browse files
committed
build: add minimum configs for running locally
This does not mean it's set up to handle real requests. Stuff that's left out: * keys, etc. Jira: IAM-1908
1 parent 1001b0e commit 7851964

3 files changed

Lines changed: 53 additions & 3 deletions

File tree

Dockerfile.local

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
1-
FROM debian:13-slim
1+
# This is mostly the same as the regular Dockerfile build, except we cache
2+
# locally.
3+
FROM rust:latest
4+
5+
WORKDIR /usr/src/app
6+
COPY . .
7+
RUN --mount=type=cache,target=/usr/src/app/target/release/build \
8+
--mount=type=cache,target=/usr/src/app/target/release/deps \
9+
--mount=type=cache,target=/usr/src/app/target/release/incremental \
10+
--mount=type=cache,target=/usr/local/cargo/registry \
11+
ls -lah target/release/build && ls -lah target/release/deps && ls -lah target/release/incremental && \
12+
cargo build --release
13+
14+
FROM debian:13-slim
215

316
RUN apt-get update && apt-get install -y \
417
libpq5 ca-certificates \
518
&& rm -rf /var/lib/apt/lists/*
6-
719
WORKDIR /root/
8-
COPY target/release/dino-park-packs .
20+
COPY --from=0 /usr/src/app/target/release/dino-park-packs .
921
CMD ["./dino-park-packs"]

dev/docker-compose.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,15 @@ services:
88
environment:
99
POSTGRES_DB: dino-park-packs-test-local
1010
POSTGRES_PASSWORD: localhost
11+
12+
packs:
13+
image: dino-park-packs:development
14+
build:
15+
context: ../
16+
dockerfile: Dockerfile.local
17+
environment:
18+
DPP_SETTINGS: /root/.settings
19+
volumes:
20+
- ../dev/settings.json:/root/.settings.json
21+
ports:
22+
- 127.0.0.1:8085:8085

dev/settings.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"auth": "https://dev.mozilla-dev.auth0.com",
3+
"cis": {
4+
"client_config": {
5+
"client_id": "",
6+
"client_secret": "",
7+
"audience": "",
8+
"token_endpoint": "https://idp",
9+
"scopes": ""
10+
},
11+
"sign_keys": {
12+
"source": "none"
13+
},
14+
"verify_keys": {
15+
"source": "none"
16+
},
17+
"person_api_user_endpoint": "https://person-api.cis",
18+
"person_api_users_endpoint": "https://person-api.cis",
19+
"change_api_user_endpoint": "https://change-api.cis",
20+
"change_api_users_endpoint": "https://change-api.cis"
21+
},
22+
"packs": {
23+
"postgres_url": "postgres://postgres:localhost@postgres/dino-park-packs-test-local",
24+
"domain": "0.0.0.0"
25+
}
26+
}

0 commit comments

Comments
 (0)