You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update README with simplified instructions (including Windows setup) (#956)
* Add Windows docker troubleshooting link to README
Addresses the docker error I was encountering
Signed-off-by: Dave Thaler <dthaler1968@gmail.com>
* Update link
Signed-off-by: Dave Thaler <dthaler1968@gmail.com>
* Add more Windows OS notes
Signed-off-by: Dave Thaler <dthaler1968@gmail.com>
* Remove sections on docker-compose and running directly
Signed-off-by: Dave Thaler <dthaler1968@gmail.com>
* Update devcontainer.json with elixirLS settings
Signed-off-by: Dave Thaler <dthaler1968@gmail.com>
* Replace docker-compose with docker compose
Addresses a PR comment
Signed-off-by: Dave Thaler <dthaler1968@gmail.com>
* Revert unnecessary sentence.
Signed-off-by: Dave Thaler <dthaler1968@gmail.com>
---------
Signed-off-by: Dave Thaler <dthaler1968@gmail.com>
Copy file name to clipboardExpand all lines: README.md
+9-76Lines changed: 9 additions & 76 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,22 +15,23 @@ Please check out the [CONTRIBUTING](CONTRIBUTING.md) doc for tips on making a su
15
15
16
16
## Quick Start
17
17
18
-
1. Load the Docker Configuration: `docker-compose up`
18
+
1. Load the Docker Configuration: `dockercompose up`
19
19
2. Wait for containers to start up
20
20
3. Navigate to [localhost:3000](http://localhost:3000) to view the website
21
21
4. Navigate to [localhost:4000](http://localhost:4000) to access the API server
22
22
23
23
> **Note**
24
-
> This assumes you have installed [docker](https://docs.docker.com/engine/install/) and [docker-compose](https://docs.docker.com/compose/install/).
24
+
> This assumes you have installed [docker](https://docs.docker.com/engine/install/). If you're running Windows,
25
+
> ensure [Docker Desktop](https://docs.docker.com/desktop/setup/install/windows-install/) is installed and running.
25
26
26
27
### Running in Docker
27
28
28
-
Docker is the quickest way to get the project up and running, especially if you haven't already set up Erlang/Elixir/Node. The only requirement is that you have both [docker](https://docs.docker.com/v17.09/engine/installation/) and [docker-compose](https://docs.docker.com/compose/install/) installed on your machine.
29
+
Docker is the quickest way to get the project up and running, especially if you haven't already set up Erlang/Elixir/Node. The only requirement is that you have [docker](https://docs.docker.com/engine/install/) installed on your machine.
29
30
30
-
Once you clone the repository, you can just run docker-compose in the root directory:
31
+
Once you clone the repository, you can just run `dockercompose` in the root directory:
31
32
32
33
```shell
33
-
docker-compose up
34
+
dockercompose up
34
35
```
35
36
36
37
This will build an image locally with all the dependencies you need. It will also pull a pre-built image from [Docker Hub](https://hub.docker.com/r/orcasound/orcasite) for the database, automatically configure everything, and both the Phoenix and Next.js servers. The orcasite page will be accessible at [`http://localhost:3000`](http://localhost:3000) as soon as the `web` container finishes starting up.
@@ -39,19 +40,9 @@ This will build an image locally with all the dependencies you need. It will als
39
40
40
41
The [quick start](#quick-start) setup is great for getting the project up and running, but if you want to do development, you'll want to be able to modify the source code without re-building an entire Docker image.
41
42
42
-
### Setup options
43
+
### Setup
43
44
44
-
There are several options for how to set up your dev environment:
-[Directly on your machine](#set-up-directly-on-machine)
49
-
50
-
Once you have one of these up and running, see the [Getting everything running](#getting-everything-running) section for how to start the project.
51
-
52
-
#### Using VS Code
53
-
54
-
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.
45
+
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.
55
46
56
47
> **Tip**
57
48
> For a better VS Code experience, copy the example settings file:
@@ -62,64 +53,6 @@ This project comes with a [devcontainer.json configuration](https://code.visuals
62
53
>
63
54
> This provides recommended editor settings for this project. You can also see & install recommended extensions by opening the command palette (Cmd+Shift+P) and selecting "Extensions: Show Recommended Extensions".
64
55
65
-
#### Using docker-compose directly
66
-
67
-
If you prefer not to use VS Code dev containers, the easiest way to develop in docker is by starting up docker-compose manually (using the dev compose file):
68
-
69
-
```shell
70
-
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d
71
-
```
72
-
73
-
> **Note**
74
-
> 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:
> After setting COMPOSE_FILE, you can just run `docker-compose up -d` from anywhere in the project.
81
-
82
-
Once you have the services started, you can start a session inside the `web` container:
83
-
84
-
```shell
85
-
docker-compose exec web bash
86
-
```
87
-
88
-
From here you can run the [commands below](#getting-everything-running) to get everything started.
89
-
90
-
> **Note**
91
-
> The `docker-compose` setup uses bind mounting for the source files, which means if you edit the source on your host file system, the changes will get picked up and live reloaded in your browser.
92
-
93
-
#### Set up directly on machine
94
-
95
-
If Docker doesn't suit your needs, you can follow these instructions to get everything running directly on your machine.
96
-
97
-
##### Language
98
-
99
-
You will need to install Erlang, Elixir, and Node.js. You can use a tool like [`asdf`](https://github.com/asdf-vm/asdf) to manage your language dependencies.
100
-
101
-
Language-level dependencies can be found under `.tool-versions`.
102
-
103
-
##### Database
104
-
105
-
You will need to install Postgres and set up the `postgres` user with a password. The default connection details are:
106
-
107
-
```text
108
-
username: "postgres"
109
-
password: "postgres"
110
-
database: "orcasite_dev"
111
-
hostname: "localhost"
112
-
port: 5432
113
-
```
114
-
115
-
You can pass in custom values using env variables. Full details can be found in [`dev.exs`](config/dev.exs).
116
-
117
-
Orcasite uses [PostGIS](http://postgis.net/) for location data inside of Postgres. To install on MacOS, run
118
-
119
-
```shell
120
-
brew install postgis
121
-
```
122
-
123
56
### Getting everything running
124
57
125
58
Once you have your environment setup via one of the options above, you can start the project. You'll need to run both the Phoenix server and the Next.js server.
@@ -157,7 +90,7 @@ Once everything finishes starting up, you'll be able to access the UI at [`http:
157
90
The development environment automatically seeds the database with real data from the production server, including detections, audio images, and other records. This happens via background jobs that sync data every 1 minute.
158
91
159
92
>**Note:**
160
-
> Seeded resources will only work with feeds that match production (i.e. with the same `id` and `slug`). Clear your data with `mix ecto.drop` and re-initialize it with `mix ecto.setup` to get the latest data from the production servers.
93
+
> Seeded resources will only work with feeds that match production (i.e., with the same `id` and `slug`). Clear your data with `mix ecto.drop` and re-initialize it with `mix ecto.setup` to get the latest data from the production servers.
0 commit comments