Skip to content

Commit 56c59d5

Browse files
authored
Merge pull request #50 from bheesham/minor-settings-fixups
Minor settings fixups
2 parents 90ac2f6 + 29ab1d7 commit 56c59d5

5 files changed

Lines changed: 20 additions & 4 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "dino-park-packs"
3-
version = "0.5.13"
3+
version = "0.5.14"
44
authors = ["Florian Merz <flomerz@gmail.com>"]
55
edition = "2018"
66

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ FROM debian:13-slim
99
RUN apt-get update && apt-get install -y \
1010
libpq5 ca-certificates \
1111
&& rm -rf /var/lib/apt/lists/*
12+
1213
WORKDIR /root/
1314
COPY --from=0 /usr/src/app/target/release/dino-park-packs .
1415
CMD ["./dino-park-packs"]

dev/docker-compose.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,20 @@ services:
99
POSTGRES_DB: dino-park-packs-test-local
1010
POSTGRES_PASSWORD: localhost
1111

12+
adminer:
13+
image: adminer:5-standalone
14+
ports:
15+
- 127.0.0.1:9000:8080
16+
environment:
17+
ADMINER_DEFAULT_SERVER: postgres
18+
1219
packs:
1320
image: dino-park-packs:development
1421
build:
1522
context: ../
1623
dockerfile: Dockerfile.local
1724
environment:
18-
DPP_SETTINGS: /root/.settings
25+
DPP_SETTINGS: /root/.settings.json
1926
volumes:
2027
- ../dev/settings.json:/root/.settings.json
2128
ports:

dev/settings.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
{
2-
"auth": "https://dev.mozilla-dev.auth0.com",
2+
"comment": [
3+
"DEBT: The config parser expects all keys to be defined. It does not use",
4+
"the fallback to using the default values on `None`. This comment section",
5+
"is also a hack.",
6+
"See also:",
7+
"* src/settings.rs;",
8+
"* the `config` dependency."
9+
],
10+
"auth": "https://dev.mozilla-dev.auth0.com/",
311
"cis": {
412
"client_config": {
513
"client_id": "",

src/settings.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ impl Settings {
3030
let file = env::var("DPP_SETTINGS").unwrap_or_else(|_| String::from(".settings"));
3131
Config::builder()
3232
.add_source(File::with_name(&file))
33-
.add_source(Environment::default().separator("__").prefix("dp"))
33+
.add_source(Environment::with_prefix("DP").separator("__"))
3434
.build()
3535
.and_then(Config::try_deserialize::<Settings>)
3636
}

0 commit comments

Comments
 (0)