Skip to content
Snippets Groups Projects
Commit 3d08485b authored by Lars Johansson's avatar Lars Johansson
Browse files

Added dockerisation

parent 3528ddbb
No related branches found
No related tags found
No related merge requests found
# ------------------------------------------------------------------------------
# Copyright (C) 2021 European Spallation Source ERIC.
# ------------------------------------------------------------------------------
FROM openjdk:17
# deployment unit
COPY target/naming-backend-0.0.1-SNAPSHOT.jar /naming/naming-backend-0.0.1-SNAPSHOT.jar
CMD ["java", "-jar", "/naming/naming-backend-0.0.1-SNAPSHOT.jar", "--spring.config.name=application-docker"]
# ------------------------------------------------------------------------------
# Copyright (C) 2022 European Spallation Source ERIC.
# ------------------------------------------------------------------------------
version: '3.7'
services:
naming:
build: ./
ports:
- "8080:8083"
depends_on:
- postgres
command: "java -jar /naming/naming-backend-0.0.1-SNAPSHOT.jar"
postgres:
container_name: "postgres"
image: "postgres:9.6.7"
ports:
- "5432:5432"
environment:
POSTGRES_DB: discs_names
POSTGRES_USER: discs_names
POSTGRES_PASSWORD: discs_names
PGDATA: /var/lib/postgresql/data/pgdata
volumes:
- naming-data:/var/lib/postgresql/data/pgdata
volumes:
naming-data:
server.port=8083
spring.profiles.active=@spring.profiles.active@
# ------------------------------------------------------------
spring.datasource.url=jdbc:postgresql://postgres:5432/discs_names
spring.datasource.username=discs_names
spring.datasource.password=discs_names
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
spring.jpa.hibernate.ddl-auto=none
spring.jpa.hibernate.show-sql=true
server.port=8083
spring.profiles.active=@spring.profiles.active@
# ------------------------------------------------------------
spring.datasource.url=jdbc:postgresql://postgres:5432/discs_names
spring.datasource.username=discs_names
spring.datasource.password=discs_names
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
spring.jpa.hibernate.ddl-auto=none
spring.jpa.hibernate.show-sql=true
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment