New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setup docker #32
Setup docker #32
Conversation
Dockerfile
Outdated
@@ -0,0 +1,20 @@ | |||
FROM elixir:latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
может быть стоит зафиксировать версию, чтобы избежать неожиданностей в будущем.
FROM elixir:2.4.5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Может быть 1.4.5?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Конечно. Спасибо!
Dockerfile
Outdated
@@ -0,0 +1,20 @@ | |||
FROM elixir:latest | |||
|
|||
RUN apt-get update && apt-get upgrade -y && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
сюда обычно добавляют чистку apt && rm -rf /var/lib/apt/lists/*
Makefile
Outdated
docker-compose build web | ||
|
||
compose-install-deps: | ||
docker-compose run web mix deps.get |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
я бы добавил установку зависимостей в Dockerfile
Makefile
Outdated
|
||
|
||
compile: | ||
mix compile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
тоже в Dockerfile
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ansible относится к другому тикету
config/dev.exs
Outdated
@@ -39,5 +39,5 @@ config :codebattle, Codebattle.Repo, | |||
username: "postgres", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Значения должны подтягиваться из переменных окружения.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Исправляю
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Не забудь про префикс переменных CODEBATTLE_
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Уже сделал)
Как насчет сделать например |
Я добавил сервис
|
Весьма базовый сетап, но приложение доступно на http://localhost:4000/ после последовательности make-ов:
Помогите улучшить.