Commit fe6fa479 authored by ccottier's avatar ccottier

working local db, working on compose

parent 3ac91f62
......@@ -22,6 +22,7 @@ dependencies {
runtimeOnly 'com.h2database:h2'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'com.h2database:h2'
compile 'org.postgresql:postgresql:42.2.19.jre7'
}
test {
......
version: "3.5"
services:
emp_db:
container_name: pgDatabase
image: postgres
ports:
- 3191:5432
networks:
- empnetwork
spring_boot:
container_name: employeesApp
image: ccottiernsm/employee-service
ports:
- 8081:8080
depends_on:
- emp_db
networks:
- empnetwork
networks:
empnetwork:
name: empnetwork
driver: bridge
spring.datasource.url=jdbc:h2:mem:dataSource
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.username=sa
spring.datasource.password=
spring.datasource.url=jdbc:postgresql://localhost:5432/emp_serv_db
spring.datasource.driverClassName=org.postgresql.Driver
spring.datasource.username=emp_serv
spring.datasource.password=emp_serv
spring.datasource.schema=classpath:employee.sql
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
spring.jpa.hibernate.ddl-auto=none
#spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
#spring.jpa.hibernate.ddl-auto=none
spring.h2.console.enabled=true
#spring.h2.console.enabled=true
management.endpoint.beans.enabled=true
management.endpoints.web.exposure.include=*
info.app.name=Employee Service Application Actuator
#info.app.name=Employee Service Application Actuator
\ No newline at end of file
DROP TABLE IF EXISTS EMPLOYEE;
CREATE TABLE EMPLOYEE (
ID INT AUTO_INCREMENT PRIMARY KEY,
ID INT SERIAL PRIMARY KEY,
FIRST_NAME VARCHAR (255) NOT NULL,
LAST_NAME VARCHAR (255) NOT NULL
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment