Skip to content

Add docker#6

Open
AleksandraBoycova wants to merge 12 commits intomainfrom
add-docker
Open

Add docker#6
AleksandraBoycova wants to merge 12 commits intomainfrom
add-docker

Conversation

@AleksandraBoycova
Copy link
Owner

No description provided.

depends_on:
- db
environment:
- SPRING_DATASOURCE_URL=jdbc:postgresql://db:5432/postgres

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

в environment для server лучше добавить имя и пароль для подключения к БД

@@ -0,0 +1,3 @@
FROM amazoncorretto:11

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. лучше добавить VOLUME, чтобы анализировать проблемы нужно иметь доступ к логам приложения.
    Посмотри как можно получить логи приложения с VOLUME и без него.

  2. приложения обычно запускается с набором JAVA_OPTS например для настроек GC, и объёмы памяти.
    попробуй добавить переменную JAVA_OPTS в ENTRYPOINT и залогируй на старте приложения получнные опции

import javax.validation.constraints.PositiveOrZero;
import java.util.List;

@RestController

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

в сервер осталась валидация через @validated

- "8080:8080"
depends_on:
- server
- db

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

по заданию gateway к БД не подключается, поэтому зависимость db можно убрать

start-app.sh Outdated
@@ -0,0 +1,2 @@
#!/bin/bash
run docker-compose.yml No newline at end of file

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

этот скрипт точно работает?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments