Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

Commit

Permalink
Add structure sql (#114)
Browse files Browse the repository at this point in the history
* add structure.sql

* remove comma
  • Loading branch information
NikitaNaumenko authored and mokevnin committed Sep 11, 2019
1 parent 1a691e1 commit 314edf6
Show file tree
Hide file tree
Showing 6 changed files with 722 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version: '3'
services:

db:
image: postgres:11.1
image: postgres:9.6
volumes:
- pgdata:/var/lib/postgresql/data

Expand Down
3 changes: 1 addition & 2 deletions make-services-app.mk
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ app-db-drop:
docker-compose run app mix ecto.drop

app-db-prepare:
docker-compose run app mix ecto.create
docker-compose run app mix ecto.migrate
docker-compose run app mix ecto.setup

app-exercises-load-python:
docker pull hexletbasics/exercises-python
Expand Down
1 change: 1 addition & 0 deletions services/app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ RUN curl -sL https://deb.nodesource.com/setup_12.x | bash -

RUN apt-get update && apt-get install -y inotify-tools
RUN apt-get update && apt-get install -y nodejs
RUN apt-get update && apt-get install -yqq postgresql-client
RUN npm install -g npm-check-updates env-cmd

# Install hex (Elixir package manager)
Expand Down
2 changes: 1 addition & 1 deletion services/app/docker-compose.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: '2'

services:
db:
image: postgres:11.1
image: postgres:9.6
test:
image: app
command: mix test
Expand Down
6 changes: 4 additions & 2 deletions services/app/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,11 @@ defmodule HexletBasics.Mixfile do
# See the documentation for `Mix` for more info on aliases.
defp aliases do
[
"ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"],
"ecto.setup": ["ecto.create", "ecto.load --skip-if-loaded", "run priv/repo/seeds.exs"],
"ecto.reset": ["ecto.drop", "ecto.setup"],
test: ["ecto.create --quiet", "ecto.migrate", "test"],
"db.migrate": ["ecto.migrate", "ecto.dump"],
"db.rollback": ["ecto.rollback", "ecto.dump"],
test: ["ecto.setup", "test"],
# compile: ["compile --warnings-as-errors"]
]
end
Expand Down
Loading

0 comments on commit 314edf6

Please sign in to comment.