-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: docker instructions and fixes (#6465)
* build: docker instructions and fixes - replace the outdated `docker-compose` command with `docker compose` in the READMEs. - fix `AS` in Dockerfile. - update the Docker instructions in the READMEs. - make sure that environment variables are set for local development in the `docker-compose.yml` files. * update the project README * Reove obsolete version field * update app-root's readme and docker-compose.yml --------- Co-authored-by: Delilah <[email protected]>
- Loading branch information
1 parent
55f7d5c
commit 958e806
Showing
7 changed files
with
59 additions
and
24 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 |
---|---|---|
|
@@ -70,17 +70,25 @@ You can run the code locally in Docker, which avoids needing to install Node or | |
```sh | ||
git clone [email protected]:zooniverse/front-end-monorepo.git | ||
cd front-end-monorepo | ||
docker-compose build | ||
# build first | ||
docker compose build | ||
# run all services in the background (no authentication available) | ||
# app-project at http://localhost:3002/projects/[owner]/[project-name] | ||
# app-root at http://localhost:3003 | ||
docker compose up -d | ||
# shut down the running containers when you're finished | ||
docker compose down | ||
# run this if you need a shell inside the running container | ||
docker compose run --rm shell | ||
``` | ||
|
||
`docker-compose up` runs local production builds as follows: | ||
|
||
- project app at http://localhost:3002 | ||
- root app at http://localhost:3003 | ||
|
||
`docker-compose down` stops the running container. | ||
|
||
`docker-compose run --rm shell` runs an interactive shell on the Docker image. | ||
You can supply a service name (from `docker-compose.yml`) to `docker compose` if you only want to run a single service eg. | ||
```sh | ||
# only build the project app | ||
docker compose build fe-project | ||
# only run the project app | ||
docker compose up -d fe-project | ||
``` | ||
|
||
Development environments for individual packages can be run from the package directories. For example: | ||
|
||
|
@@ -89,7 +97,7 @@ cd packages/app-project | |
docker-compose up | ||
``` | ||
|
||
to run a development server for the project app. | ||
to run a development server for the project app. See the READMEs for individual packages for detailed instructions. | ||
|
||
### With Node and yarn | ||
|
||
|
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
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
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