forked from Archives/Athou_commafeed
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
99130d0181 | ||
|
|
90e2036cbe |
9
.github/workflows/build.yml
vendored
9
.github/workflows/build.yml
vendored
@@ -14,6 +14,13 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
# Setup
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Set up Java
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
@@ -21,6 +28,7 @@ jobs:
|
||||
distribution: "temurin"
|
||||
cache: "maven"
|
||||
|
||||
# Build
|
||||
- name: Build with Maven
|
||||
run: mvn --batch-mode --update-snapshots verify
|
||||
|
||||
@@ -42,6 +50,7 @@ jobs:
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm/v7
|
||||
push: ${{ github.ref_type == 'tag' && matrix.java == '8' }}
|
||||
tags: |
|
||||
athou/commafeed:latest
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM openjdk:17-alpine
|
||||
FROM eclipse-temurin:17-jre
|
||||
|
||||
RUN mkdir -p /commafeed/data
|
||||
VOLUME /commafeed/data
|
||||
|
||||
@@ -61,6 +61,8 @@ import be.tomcools.dropwizard.websocket.WebsocketBundle;
|
||||
import io.dropwizard.Application;
|
||||
import io.dropwizard.assets.AssetsBundle;
|
||||
import io.dropwizard.configuration.DefaultConfigurationFactoryFactory;
|
||||
import io.dropwizard.configuration.EnvironmentVariableSubstitutor;
|
||||
import io.dropwizard.configuration.SubstitutingSourceProvider;
|
||||
import io.dropwizard.db.DataSourceFactory;
|
||||
import io.dropwizard.forms.MultiPartBundle;
|
||||
import io.dropwizard.hibernate.HibernateBundle;
|
||||
@@ -96,7 +98,15 @@ public class CommaFeedApplication extends Application<CommaFeedConfiguration> {
|
||||
return objectMapper.enable(MapperFeature.ACCEPT_CASE_INSENSITIVE_PROPERTIES);
|
||||
}
|
||||
});
|
||||
bootstrap.setConfigurationSourceProvider(new EnvironmentSubstitutor("CF", bootstrap.getConfigurationSourceProvider()));
|
||||
|
||||
// enable config.yml string substitution
|
||||
// e.g. having a custom config.yml file with app.session.path=${SOME_ENV_VAR} will substitute SOME_ENV_VAR
|
||||
SubstitutingSourceProvider substitutingSourceProvider = new SubstitutingSourceProvider(bootstrap.getConfigurationSourceProvider(),
|
||||
new EnvironmentVariableSubstitutor(false));
|
||||
// enable config.yml properties override with env variables prefixed with CF_
|
||||
// e.g. setting CF_APP_ALLOWREGISTRATIONS=true will set app.allowRegistrations to true
|
||||
EnvironmentSubstitutor environmentSubstitutor = new EnvironmentSubstitutor("CF", substitutingSourceProvider);
|
||||
bootstrap.setConfigurationSourceProvider(environmentSubstitutor);
|
||||
|
||||
bootstrap.getObjectMapper().registerModule(new MetricsModule(TimeUnit.SECONDS, TimeUnit.SECONDS, false));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user