Skip to content

Commit

Permalink
update elixir/phx version, add DB
Browse files Browse the repository at this point in the history
  • Loading branch information
ysaito8015 committed Sep 9, 2020
1 parent 34e760c commit 0b862c9
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

Expand All @@ -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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
27 changes: 26 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -11,4 +29,11 @@ services:
working_dir: /apps
ports:
- "4000:4000"
depends_on:
- postgres
- mysql
tty: true

volumes:
postgres_data:
mysql_data:

0 comments on commit 0b862c9

Please sign in to comment.