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
Copy Markdown
Owner

No description provided.

Comment thread docker-compose.yml
depends_on:
- db
environment:
- SPRING_DATASOURCE_URL=jdbc:postgresql://db:5432/postgres
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

Comment thread gateway/Dockerfile
@@ -0,0 +1,3 @@
FROM amazoncorretto:11
Copy link
Copy Markdown

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
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

Comment thread docker-compose.yml Outdated
- "8080:8080"
depends_on:
- server
- db
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

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

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