-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding readme and service name and image tag option
- Loading branch information
Showing
3 changed files
with
56 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
|
||
|
||
# Marvin Docker | ||
|
||
Describes the setup of a containerized system hosting the Marvin | ||
web application. | ||
|
||
|
||
## Initial Setup | ||
|
||
There are two bind mounts: | ||
|
||
- The SDSS SAS filesystem | ||
- The host machine pgpass config file | ||
|
||
1. Set a `SAS_BASE_DIR` environment variable that points to the | ||
top level directory of the SDSS SAS filesystem. | ||
|
||
2. Create or check that a pgpass config file exists at `$HOME/.pgpass`, which contains the manga database connection string info `host.docker.internal:5432:manga:marvin:(password)`. Replace the `(password)` with the local database password. | ||
|
||
The marvin docker setup attempts to connect to the local host machine postgres database directly using `host.docker.internal` | ||
|
||
|
||
## Run docker compose | ||
|
||
All commands are relative to within the docker folder. From the top-level repo, run `cd docker` | ||
|
||
To build and run the docker compose system: | ||
```bash | ||
docker compose up | ||
``` | ||
To force a build, you can do: `docker compose up --build` | ||
|
||
Navigate to `http://localhost:8080/marvin/`. | ||
|
||
To bring the system down: | ||
```bash | ||
docker compose down | ||
``` | ||
|
||
The docker compose system starts three services: | ||
- Marvin Webapp - the backend web application, mounted to port 8000 | ||
- Nginx - the nginx web service, mounted to port 8080 | ||
- Redis - a redis database for caching | ||
|
||
The final web application is available at `localhost:8080/marvin` |
This file contains 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