Skip to content

Commit

Permalink
Update Readme with deve mode instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
manning-ncsa committed Jul 12, 2024
1 parent c7424af commit 7922522
Showing 1 changed file with 18 additions and 38 deletions.
56 changes: 18 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,54 +7,34 @@ Workflow for contributing content updates
----------------------------------------------

0. [Install `docker`](https://docs.docker.com/engine/install/) and `git`.
1. Fork the repo https://github.com/des-labs/des_ncsa to https://github.com/$GITHUB_USER/des_ncsa where `$GITHUB_USER` is your GitHub account username.
2. Clone your fork locally and checkout the `dev` branch.
1. Fork the repo `https://github.com/des-labs/des_ncsa` to `https://github.com/$GITHUB_USER/des_ncsa` where `$GITHUB_USER` is your GitHub account username.
2. Clone your fork locally and create a `dev-$RELEASE_NAME` branch, where `$RELEASE_NAME` is some short meaningful name like `dr2` or `y6bao`.
```shell
CLONE_DIR="$HOME/src/$GITHUB_USER/des_ncsa"
git clone https://github.com/$GITHUB_USER/des_ncsa $CLONE_DIR
cd $CLONE_DIR
git checkout dev
git checkout -b dev-$RELEASE_NAME
```

3. Build the Docker image.
```shell
docker build -t desdm-public:dev .
docker build . -t desdm-public --platform linux/x86_64
```

or on MacOS:
```shell
docker build --platform linux/x86_64 -t desdm-public:dev .
```

4. Configure the webserver to run in "dev" mode.
```shell
docker run --rm --name desdm-public \
-p 8080:8080 \
-v $(pwd):/home/des \
-u $(id -u) \
desdm-public:dev \
python3 vulcan.py --dev
```

again adding the flag ``--platform linux/x86_64`` on MacOS

5. Run the webserver to serve the webpage.
4. Configure the webserver to run in "development mode".
```shell
docker run --rm --name desdm-public \
-p 8080:8080 \
-v $(pwd):/home/des \
-u $(id -u) \
desdm-public:dev
docker run --rm -d --name desdm-public --platform linux/x86_64 \
-p 8888:8080 \
-v $(pwd):/home/des \
-u $(id -u) \
-e DEBUG_ENABLED="true" \
desdm-public
```

Once again adding the flag ``--platform linux/x86_64`` on MacOS

6. Open your browser to http://127.0.0.1:8080 to view the website.
7. Ensure that the ServiceWorker is not registered. Open your web browser's web development tools. In Firefox, use CTRL+SHIFT+I and go to the Application tab. Disable/remove any ServiceWorker you see listed.
8. Edit and save the relevant HTML files. Reload the page and see the results. Repeat this step until satisfied.
9. Commit only the substantive changes to the git repo and push the updates to your GitHub fork. Do not commit the changes related to the "dev mode" configuration.
5. Open your browser to http://127.0.0.1:8888 to view the website.
6. Edit and save the relevant HTML files. Reload the page and see the results. Repeat this step until satisfied.
7. Commit only the substantive changes to the Git repo and push the updates to your GitHub fork.
```shell
git add
git add [path/to/file_1] [path/to/file_2] [...]
git commit -m 'Updated release page blah'
git push
git push origin dev-$RELEASE_NAME
```
10. Create a pull request to merge and publish your changes. You must [inform the DES Science Release community via the #sci-release Slack channel](https://darkenergysurvey.slack.com/archives/C0PMTCWRL) to allow for a peer review of the submission before it can be accepted.
8. Create a pull request to merge and publish your changes. You must [inform the DES Science Release community via the #sci-release Slack channel](https://darkenergysurvey.slack.com/archives/C0PMTCWRL) to allow for a peer review of the submission before it can be accepted.

0 comments on commit 7922522

Please sign in to comment.