Skip to content

Commit

Permalink
Improve setup instructions in README (#151)
Browse files Browse the repository at this point in the history
* Add COMPOSE_FILE env instructions to README

* minor edit

* Add link to dev containers install
  • Loading branch information
paulcretu committed Jul 26, 2023
1 parent 73e2716 commit 6b3873f
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Once you have one of these up and running, see the [Getting everything running](

#### Using VS Code

This project comes with a [devcontainer.json configuration](https://code.visualstudio.com/docs/devcontainers/containers) which can be used with VS Code. This takes care of all the `docker-compose` stuff in the background so you don't have to worry about it. When you open the project in VS Code, it should prompt you to start it in a dev container. Once the dev container starts, you can open a new terminal window in VS Code to run commands. See [the commands below](#getting-everything-running) for how to get everything started.
This project comes with a [devcontainer.json configuration](https://code.visualstudio.com/docs/devcontainers/containers) which can be used with VS Code. This takes care of all the `docker-compose` stuff in the background so you don't have to worry about it. When you open the project in VS Code, it should prompt you to start it in a dev container (assuming [you've installed docker and the dev containers extension](https://code.visualstudio.com/docs/devcontainers/containers#_installation)). Once the dev container starts, you can open a new terminal window in VS Code to run commands. See [the commands below](#getting-everything-running) for how to get everything started.

#### Using docker-compose directly

Expand All @@ -60,6 +60,15 @@ If you prefer not to use VS Code dev containers, the easiest way to develop in d
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d
```

> **Note**
> You can also set the `COMPOSE_FILE` environment variable to avoid having to specify the compose files every time. This one-liner will do that for you no matter which subdirectory you're in:
>
> ```
> export COMPOSE_FILE=`git rev-parse --show-toplevel`/docker-compose.yml:`git rev-parse --show-toplevel`/docker-compose.dev.yml
> ```
>
> After setting COMPOSE_FILE, you can just run `docker-compose up -d` from anywhere in the project.
Once you have the services started, you can start a session inside the `web` container:

```
Expand Down Expand Up @@ -149,7 +158,6 @@ heroku run POOL_SIZE=2 iex -S mix

The `POOL_SIZE` config var is necessary due to the current Postgres db having 20 connections. You can read more [about it here](https://hexdocs.pm/phoenix/heroku.html#creating-environment-variables-in-heroku).


## Emails

Orcasite uses MJML for email templating. There are a few online MJML renderers, including: [mjml.io](https://mjml.io/try-it-live) and [grapes.js](https://grapesjs.com/demo-mjml.html)
Orcasite uses MJML for email templating. There are a few online MJML renderers, including: [mjml.io](https://mjml.io/try-it-live) and [grapes.js](https://grapesjs.com/demo-mjml.html)

0 comments on commit 6b3873f

Please sign in to comment.