Loading deploy/.env +3 −0 Original line number Diff line number Diff line Loading @@ -3,3 +3,6 @@ PARENT_IMAGE_TAG=latest MICROSERVICE_NAME=oauth MICROSERVICE_PORT=8081 TRAEFIK_ENTRYPOINT=http TRAEFIK_SUBDOMAIN=oauth deploy/docker-compose.dev.yml +2 −2 Original line number Diff line number Diff line Loading @@ -8,7 +8,7 @@ services: resources: limits: cpus: '${RESOURCES_LIMITS_CPUS:-0.5}' memory: ${RESOURCES_LIMITS_MEMORY:-512M} memory: ${RESOURCES_LIMITS_MEMORY:-1G} reservations: cpus: '${RESOURCES_RESERVATIONS_CPUS:-0.001}' memory: ${RESOURCES_RESERVATIONS_MEMORY:-410M} memory: ${RESOURCES_RESERVATIONS_MEMORY:-820M} deploy/docker-compose.tmpl.yml +8 −5 Original line number Diff line number Diff line Loading @@ -26,15 +26,18 @@ services: test: wget --spider -q http://localhost:${MICROSERVICE_PORT}/api/${MICROSERVICE_NAME}/actuator/health interval: ${HEALTHCHECK_INTERVAL:-30s} timeout: ${HEALTHCHECK_TIMEOUT:-10s} retries: ${HEALTHCHECK_RETRIES:-3} start_period: ${HEALTHCHECK_START_PERIOD:-2m} retries: ${HEALTHCHECK_RETRIES:-10} start_period: ${HEALTHCHECK_START_PERIOD:-5m} deploy: mode: replicated replicas: ${REPLICAS:-1} labels: traefik.frontend.rule: Host:${PUBLIC_HOSTNAME};PathPrefix:/api/${MICROSERVICE_NAME} traefik.backend: ${MICROSERVICE_NAME} traefik.port: "${MICROSERVICE_PORT}" traefik.enable: 'true' traefik.http.routers.redmic-oauth.entrypoints: ${TRAEFIK_ENTRYPOINT} traefik.http.routers.redmic-oauth.rule: (Host(`${PUBLIC_HOSTNAME}`) || Host(`${TRAEFIK_SUBDOMAIN}.${PUBLIC_HOSTNAME}`)) && PathPrefix(`/api/${MICROSERVICE_NAME}`) traefik.http.services.redmic-oauth.loadbalancer.server.port: ${MICROSERVICE_PORT} restart_policy: delay: ${RESTART_DELAY:-1m} update_config: Loading pom.xml +1 −1 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ <modelVersion>4.0.0</modelVersion> <artifactId>oauth</artifactId> <packaging>jar</packaging> <version>0.10.0</version> <version>0.10.0-feature-updateServiceLabels</version> <name>OAuth</name> <description>Oauth authorization server</description> Loading src/main/java/es/redmic/oauth/config/ResourceServerConfiguration.java +3 −3 Original line number Diff line number Diff line Loading @@ -56,7 +56,7 @@ public class ResourceServerConfiguration extends ResourceServerConfigurerAdapter // @formatter:off http.anonymous().and().authorizeRequests().antMatchers(HttpMethod.GET, "/oauth/actuator/**").permitAll(); http.anonymous().and().authorizeRequests().antMatchers("/oauth/actuator/**").permitAll(); http.authorizeRequests().antMatchers("/**").authenticated(); Loading Loading
deploy/.env +3 −0 Original line number Diff line number Diff line Loading @@ -3,3 +3,6 @@ PARENT_IMAGE_TAG=latest MICROSERVICE_NAME=oauth MICROSERVICE_PORT=8081 TRAEFIK_ENTRYPOINT=http TRAEFIK_SUBDOMAIN=oauth
deploy/docker-compose.dev.yml +2 −2 Original line number Diff line number Diff line Loading @@ -8,7 +8,7 @@ services: resources: limits: cpus: '${RESOURCES_LIMITS_CPUS:-0.5}' memory: ${RESOURCES_LIMITS_MEMORY:-512M} memory: ${RESOURCES_LIMITS_MEMORY:-1G} reservations: cpus: '${RESOURCES_RESERVATIONS_CPUS:-0.001}' memory: ${RESOURCES_RESERVATIONS_MEMORY:-410M} memory: ${RESOURCES_RESERVATIONS_MEMORY:-820M}
deploy/docker-compose.tmpl.yml +8 −5 Original line number Diff line number Diff line Loading @@ -26,15 +26,18 @@ services: test: wget --spider -q http://localhost:${MICROSERVICE_PORT}/api/${MICROSERVICE_NAME}/actuator/health interval: ${HEALTHCHECK_INTERVAL:-30s} timeout: ${HEALTHCHECK_TIMEOUT:-10s} retries: ${HEALTHCHECK_RETRIES:-3} start_period: ${HEALTHCHECK_START_PERIOD:-2m} retries: ${HEALTHCHECK_RETRIES:-10} start_period: ${HEALTHCHECK_START_PERIOD:-5m} deploy: mode: replicated replicas: ${REPLICAS:-1} labels: traefik.frontend.rule: Host:${PUBLIC_HOSTNAME};PathPrefix:/api/${MICROSERVICE_NAME} traefik.backend: ${MICROSERVICE_NAME} traefik.port: "${MICROSERVICE_PORT}" traefik.enable: 'true' traefik.http.routers.redmic-oauth.entrypoints: ${TRAEFIK_ENTRYPOINT} traefik.http.routers.redmic-oauth.rule: (Host(`${PUBLIC_HOSTNAME}`) || Host(`${TRAEFIK_SUBDOMAIN}.${PUBLIC_HOSTNAME}`)) && PathPrefix(`/api/${MICROSERVICE_NAME}`) traefik.http.services.redmic-oauth.loadbalancer.server.port: ${MICROSERVICE_PORT} restart_policy: delay: ${RESTART_DELAY:-1m} update_config: Loading
pom.xml +1 −1 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ <modelVersion>4.0.0</modelVersion> <artifactId>oauth</artifactId> <packaging>jar</packaging> <version>0.10.0</version> <version>0.10.0-feature-updateServiceLabels</version> <name>OAuth</name> <description>Oauth authorization server</description> Loading
src/main/java/es/redmic/oauth/config/ResourceServerConfiguration.java +3 −3 Original line number Diff line number Diff line Loading @@ -56,7 +56,7 @@ public class ResourceServerConfiguration extends ResourceServerConfigurerAdapter // @formatter:off http.anonymous().and().authorizeRequests().antMatchers(HttpMethod.GET, "/oauth/actuator/**").permitAll(); http.anonymous().and().authorizeRequests().antMatchers("/oauth/actuator/**").permitAll(); http.authorizeRequests().antMatchers("/**").authenticated(); Loading