Permalink
Browse files

prepare prod deployment with aws elasticbeanstalk

  • Loading branch information...
ufuk committed Mar 20, 2018
1 parent 655c5ef commit ddc580342b242b8f2c681ba07b6cbc169ce7ba92
@@ -0,0 +1,4 @@
option_settings:
- namespace: aws:elasticbeanstalk:application:environment
option_name: PORT
value: 8080
@@ -0,0 +1 @@
client_max_body_size 10M;
@@ -0,0 +1 @@
web: java -Dspring.profiles.active=prod -Djava.security.egd=file:/dev/./urandom -jar coding-expercise.jar
@@ -0,0 +1,19 @@
deploy:
artifact: target/elasticbeanstalk-artifact.zip
global:
application_name: coding-expercise
branch: null
default_ec2_keyname: coding-expercise
default_platform: Java 8
default_region: us-east-1
instance_profile: null
platform_name: null
platform_version: null
profile: null
repository: null
sc: null
workspace_type: Application
branch-defaults:
master:
environment: null
group_suffix: null
34 pom.xml
@@ -18,6 +18,7 @@
<properties>
<java.version>1.8</java.version>
<less.plugin.version>1.7.0.1.1</less.plugin.version>
<yuicompressor.plugin.version>1.0.0</yuicompressor.plugin.version>
<property.helper.plugin.version>2.0</property.helper.plugin.version>
@@ -40,6 +41,8 @@
<postgresql.version>42.1.4</postgresql.version>
<spring-session.version>1.3.1.RELEASE</spring-session.version>
<embedded-redis.version>0.6</embedded-redis.version>
<elasticbeanstalk.artifact.name>elasticbeanstalk-artifact</elasticbeanstalk.artifact.name>
</properties>
<dependencies>
@@ -412,6 +415,37 @@
</execution>
</executions>
</plugin>
<!-- ElasticBeanstalk artifact creation... -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<id>prepare</id>
<phase>package</phase>
<configuration>
<tasks>
<mkdir dir="${project.build.directory}/${elasticbeanstalk.artifact.name}/"/>
<copy todir="${project.build.directory}/${elasticbeanstalk.artifact.name}/"
overwrite="false">
<fileset dir="${project.build.directory}/"
includes="${project.build.finalName}.jar"/>
<fileset dir="${project.basedir}/.elasticbeanstalk/" includes=".ebextensions/**"/>
<fileset dir="${project.basedir}/.elasticbeanstalk/" includes="Procfile"/>
</copy>
<zip compress="true"
destfile="${project.build.directory}/${elasticbeanstalk.artifact.name}.zip"
basedir="${project.build.directory}/${elasticbeanstalk.artifact.name}/"/>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
@@ -1,6 +1,4 @@
###############
# Spring Boot #
###############
# Spring Boot
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQL9Dialect
spring.jpa.hibernate.ddl-auto=validate
spring.jpa.generate-ddl=false
@@ -13,6 +11,4 @@ spring.datasource.password=123qwe
liquibase.enabled=true
liquibase.contexts=dev
####################
# Coding Expercise #
####################
# Coding Expercise
@@ -1,24 +1,20 @@
###############
# Spring Boot #
###############
# Spring Boot
spring.profiles.active=prod
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQL9Dialect
spring.jpa.hibernate.ddl-auto=validate
spring.jpa.generate-ddl=false
spring.datasource.url=jdbc:postgresql://localhost:5432/codingexpercise
spring.datasource.url=${SPRING_DATASOURCE_URL}
spring.datasource.driverClassName=org.postgresql.Driver
spring.datasource.initialize=false
spring.datasource.username=root
spring.datasource.password=123qwe
spring.datasource.username=${SPRING_DATASOURCE_USERNAME}
spring.datasource.password=${SPRING_DATASOURCE_PASSWORD}
spring.thymeleaf.cache=true
liquibase.enabled=true
liquibase.contexts=prod
####################
# Coding Expercise #
####################
# Coding Expercise
coding-expercise.root-url=https://coding.expercise.com
coding-expercise.challenge-approval-strategy=admin
@@ -1,6 +1,4 @@
###############
# Spring Boot #
###############
# Spring Boot
spring.profiles.active=default
spring.redis.port=6379
@@ -20,9 +18,7 @@ spring.thymeleaf.cache=false
liquibase.enabled=false
liquibase.change-log=classpath:db/changelog/changelog-master.xml
####################
# Coding Expercise #
####################
# Coding Expercise
coding-expercise.root-url=http://localhost:8080
coding-expercise.email-status=deactive
coding-expercise.send-grid.username=
@@ -1,6 +1,4 @@
###############
# Spring Boot #
###############
# Spring Boot
spring.profiles.active=test
spring.redis.port=6379
@@ -17,9 +15,7 @@ spring.datasource.password=
liquibase.enabled=false
####################
# Coding Expercise #
####################
# Coding Expercise
coding-expercise.root-url=http://localhost:8080
coding-expercise.email-status=deactive
coding-expercise.send-grid.username=

0 comments on commit ddc5803

Please sign in to comment.