Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/frewacom/elixir-phoenix-docker-dev
Phoenix boilerplate using PostgreSQL, Docker, Typescript, ESLint and prettier
https://github.com/frewacom/elixir-phoenix-docker-dev
boilerplate docker docker-container elixir elixir-phoenix eslint postgresql-database prettier template-repository typescript
Last synced: about 2 months ago
JSON representation
Phoenix boilerplate using PostgreSQL, Docker, Typescript, ESLint and prettier
- Host: GitHub
- URL: https://github.com/frewacom/elixir-phoenix-docker-dev
- Owner: Frewacom
- Created: 2021-03-20T14:05:21.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-03-21T15:15:06.000Z (almost 4 years ago)
- Last Synced: 2024-04-14T19:58:19.341Z (9 months ago)
- Topics: boilerplate, docker, docker-container, elixir, elixir-phoenix, eslint, postgresql-database, prettier, template-repository, typescript
- Language: Elixir
- Homepage:
- Size: 235 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Elixir and Phoenix boilerplate
Boilerplate for a Phoenix application with a PostgreSQL database. Runs in a
docker container for easy setup and development.## Features
* Docker
* Typescript
* Eslint
* Prettier## Setup
> Depending on your installation, you might need to add `sudo` before each docker commmand.1. Install docker
* [Docker](https://docs.docker.com/get-started/)
* [Docker compose](https://docs.docker.com/compose/)
2. Make sure that docker is running (run the appropriate command for your system):
```
$ systemctl start docker
```
3. Build the docker container:
```
$ docker-compose build
```
4. Start the container to install Elixir dependencies
```
$ docker-compose up
```
5. Stop the container and create the PostgreSQL database:
```
$ docker-compose run web mix ecto.create
```
6. Start the container again:
```
$ docker-compose up
```
6. Navigate to:
```
localhost:4000
```## Commands
* `npm run docker:shell` - opens an interactive shell in the docker container
* `npm run docker:migrate` - starts a migration of the database using Ecto
* `npm run docker:dev` - starts the docker container
* `npm run docker:start` - starts the docker container in the background
* `npm run docker:stop` - stops all running docker containers
* `npm run tsc:dev` - watches for changes to source files and reports errors
* `npm run tsc:lint` - lints all source files in `/src`
* `npm run tsc:format` - formats all source files in `/src` using prettier
* `npm run util:rename ` - rename the phoenix application, [usage docs](https://github.com/MainShayne233/rename)