Skip to content
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

Merged
merged 11 commits into from Jul 26, 2017
Merged

Setup docker #32

merged 11 commits into from Jul 26, 2017

Conversation

ayshvab
Copy link
Contributor

@ayshvab ayshvab commented Jul 25, 2017

Весьма базовый сетап, но приложение доступно на http://localhost:4000/ после последовательности make-ов:

make compose-build:

make compose-install-deps:

make compose-create-db

make compose-migrate-db

make compose

Помогите улучшить.

@ayshvab
Copy link
Contributor Author

ayshvab commented Jul 25, 2017

#17

Dockerfile Outdated
@@ -0,0 +1,20 @@
FROM elixir:latest
Copy link

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Может быть 1.4.5?

Copy link

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 && \
Copy link

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

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

Choose a reason for hiding this comment

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

тоже в Dockerfile

Copy link

@icu0755 icu0755 left a comment

Choose a reason for hiding this comment

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

ansible относится к другому тикету

krivtsov
krivtsov previously approved these changes Jul 26, 2017
config/dev.exs Outdated
@@ -39,5 +39,5 @@ config :codebattle, Codebattle.Repo,
username: "postgres",
Copy link
Contributor

@imamatory imamatory Jul 26, 2017

Choose a reason for hiding this comment

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

Значения должны подтягиваться из переменных окружения.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Исправляю

Copy link
Contributor

Choose a reason for hiding this comment

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

Не забудь про префикс переменных CODEBATTLE_

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Уже сделал)

@sashashakun
Copy link

Как насчет сделать например make start который выполнит все эти команды?

@ayshvab
Copy link
Contributor Author

ayshvab commented Jul 26, 2017

Я добавил сервис test для тестов. Это лишнее? Проще оставить как было? :

compose-test:
	docker-compose run web make test

@mokevnin mokevnin merged commit 6025f41 into hexlet-codebattle:master Jul 26, 2017
@imamatory imamatory mentioned this pull request Jul 26, 2017
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.

None yet

7 participants