diff --git a/Dockerfile b/Dockerfile index e2869ce..d20a9a1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM elixir:1.9.4 +FROM elixir:1.10.4 ENV APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=DontWarn ENV DEBIAN_FRONTEND noninteractive @@ -8,7 +8,7 @@ RUN apt-get update RUN apt-get -y upgrade RUN apt-get -y install git vim sudo inotify-tools -RUN curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - +RUN curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - RUN apt-get -y install nodejs @@ -27,4 +27,4 @@ WORKDIR /apps RUN mix local.hex --force RUN mix local.rebar --force -RUN mix archive.install --force hex phx_new 1.4.11 +RUN mix archive.install --force hex phx_new 1.5.4 diff --git a/README.md b/README.md index 6cf8de0..93905c4 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,8 @@ Docker を用いて Elixir/Phoenix アプリケーションの開発・学習を * Debian 10 (Buster) * Erlang/OTP 22.1.8 -* Elixir 1.9.4 -* Phoenix 1.4.11 +* Elixir 1.10.4 +* Phoenix 1.5.4 * Node.js 10.18 * npm 6.13 diff --git a/docker-compose.yml b/docker-compose.yml index b5715e1..cecb85f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,23 @@ -version: "3" +version: "3.1" services: + postgres: + image: postgres:12.4-alpine + environment: + POSTGRES_USER: phoenix + POSTGRES_PASSWORD: phoenix + volumes: + - postgres_data:/var/lib/postgresql/data + + mysql: + image: mysql:8.0.21 + command: --default-authentication-plugin=mysql_native_password + environment: + MYSQL_ROOT_PASSWORD: example + MYSQL_USER: phoenix + MYSQL_PASSWORD: phoenix + volumes: + - mysql_data:/var/lib/mysql + web: build: . command: bash @@ -11,4 +29,11 @@ services: working_dir: /apps ports: - "4000:4000" + depends_on: + - postgres + - mysql tty: true + +volumes: + postgres_data: + mysql_data: