Skip to content

Commit

Permalink
Merge pull request #3 from GDSC-Hongik/feature/compose
Browse files Browse the repository at this point in the history
docker compose 구성
  • Loading branch information
cmj7271 authored Jan 9, 2025
2 parents 4146b7e + efd8c69 commit 0ecdbc2
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 28 deletions.
6 changes: 3 additions & 3 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
**/.DS_Store
**/.classpath
**/.dockerignore
**/.env
#**/.env
**/.factorypath
**/.git
**/.gitignore
Expand All @@ -23,8 +23,8 @@
**/*.dbmdl
**/*.jfm
**/charts
**/docker-compose*
**/compose.y*ml
#**/docker-compose*
#**/compose.y*ml
**/Dockerfile*
**/secrets.dev.yaml
**/values.dev.yaml
Expand Down
4 changes: 3 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
id 'com.diffplug.spotless' version '6.25.0'
}

group = 'com.example'
group = 'com.gdgoc'
version = '0.0.1-SNAPSHOT'

java {
Expand All @@ -27,7 +27,9 @@ repositories {

dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'org.postgresql:postgresql'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
Expand Down
31 changes: 30 additions & 1 deletion compose.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,36 @@
services:
server:
env_file:
- ./env/server.env
- ./env/db.env
platform: linux/arm64
build:
context: .
ports:
- 8080:8080
- "8080:8080"
depends_on:
- db

db:
env_file:
- ./env/db.env
image: postgres
restart: always
ports:
- "5432:5432"
volumes:
- data:/data/db

pgadmin:
container_name: pgadmin
image: dpage/pgadmin4
ports:
- "8088:80"
environment:
- [email protected]
- PGADMIN_DEFAULT_PASSWORD=0000
depends_on:
- db

volumes:
data:
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
package com.example.study_group;
package com.gdgoc.study_group;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class StudyGroupApplication {

public static void main(String[] args) {
SpringApplication.run(StudyGroupApplication.class, args);
}

public static void main(String[] args) {
SpringApplication.run(StudyGroupApplication.class, args);
}
}
17 changes: 10 additions & 7 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
server:
port: 8080
address:
port: ${SERVER_PORT}
address: ${SERVER_ADDRESS}

spring:
application:
name: study-group
datasource:
driver-class-name: org.postgresql.Driver
url: jdbc:postgresql://${POSTGRES_URL}:${POSTGRES_PORT}/${POSTGRES_DB}
username: ${POSTGRES_USER}
password: ${POSTGRES_PASSWORD}

jpa:
hibernate:
ddl-auto: update
properties:
hibernate:
format_sql: true
create_empty_composites:
enabled: true
show-sql: true
dialect: org.hibernate.dialect.PostgreSQLDialect
show-sql: true

This file was deleted.

0 comments on commit 0ecdbc2

Please sign in to comment.