Skip to content

Instantly share code, notes, and snippets.

@magusd
Last active February 14, 2023 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save magusd/4bb1e556f14b180c148a76d947ea5cfe to your computer and use it in GitHub Desktop.
Save magusd/4bb1e556f14b180c148a76d947ea5cfe to your computer and use it in GitHub Desktop.
elixir course
config :discuss, Discuss.Repo,
adapter: Ecto.Adapters.Postgres,
username: "postgres_dev",
password: "postgres_dev",
database: "postgres_dev",
hostname: "postgres_dev",
pool_size: 10
version: "3"
services:
elixir:
command: "sleep infinity"
build: .
volumes:
- "./:/app"
- "~/.ssh/id_rsa:/root/.ssh/id_rsa"
postgres_dev:
image: postgres:9.6
environment:
POSTGRES_USER: postgres_dev
POSTGRES_PASSWORD: postgres_dev
POSTGRES_DB: postgres_dev
ports:
- "54322:5432"
FROM elixir:1.11
RUN wget https://github.com/phoenixframework/archives/raw/master/phoenix_new-1.2.5.ez && mix archive.install --force ./phoenix_new-1.2.5.ez && rm ./phoenix_new-1.2.5.ez
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash \
&& . ~/.bashrc \
&& nvm install 16.0 \
&& nvm use 16.0
RUN mkdir -p /root/.ssh \
&& ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
WORKDIR /app
docker-compose up -d
docker-compose exec elixir bash
mix phoenix.new discuss
cd discuss
npm install
mix ecto.create
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment