BAEL-2103: Added configuration for Deploying to Google Cloud Platform App Engine.

This commit is contained in:
Corneil du Plessis
2018-09-16 19:54:41 +02:00
parent 33aa52ac94
commit 60d09f21d9
6 changed files with 75 additions and 4 deletions

View File

@@ -0,0 +1,19 @@
runtime: java
env: flex
runtime_config:
jdk: openjdk8
env_variables:
SPRING_PROFILES_ACTIVE: "gcp,mysql"
handlers:
- url: /.*
script: this field is required, but ignored
resources:
cpu: 2
memory_gb: 2
disk_size_gb: 10
volumes:
- name: ramdisk1
volume_type: tmpfs
size_gb: 0.5
manual_scaling:
instances: 1

View File

@@ -0,0 +1,3 @@
spring.cloud.gcp.sql.instance-connection-name=baeldung-spring-boot-bootstrap:europe-west2:baeldung-spring-boot-bootstrap-db
spring.cloud.gcp.sql.database-name=baeldung_bootstrap_db
spring.cloud.gcp.logging.enabled=true

View File

@@ -8,4 +8,5 @@ spring.thymeleaf.suffix=.html
server.error.path=/error
server.error.whitelabel.enabled=false
spring.jpa.generate-ddl=true
spring.jpa.generate-ddl=true
spring.jpa.hibernate.ddl-auto=update

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<include resource="org/springframework/cloud/gcp/autoconfigure/logging/logback-appender.xml" />
<include resource="org/springframework/boot/logging/logback/defaults.xml"/>
<include resource="org/springframework/boot/logging/logback/console-appender.xml" />
<root level="INFO">
<!-- If running in GCP, remove the CONSOLE appender otherwise logs will be duplicated. -->
<appender-ref ref="CONSOLE"/>
<appender-ref ref="STACKDRIVER" />
</root>
</configuration>

View File

@@ -0,0 +1 @@
spring.cloud.appId=baeldung-spring-boot-bootstrap