Last active
February 14, 2023 14:24
-
-
Save magusd/4bb1e556f14b180c148a76d947ea5cfe to your computer and use it in GitHub Desktop.
elixir course
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config :discuss, Discuss.Repo, | |
adapter: Ecto.Adapters.Postgres, | |
username: "postgres_dev", | |
password: "postgres_dev", | |
database: "postgres_dev", | |
hostname: "postgres_dev", | |
pool_size: 10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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