-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deployed 18e8338 to main with MkDocs 1.6.1 and mike 2.1.3
- Loading branch information
ci-bot
committed
Nov 15, 2024
1 parent
aee3b20
commit f5f1fdc
Showing
12 changed files
with
101 additions
and
87 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2030,6 +2030,39 @@ <h4 id="dev-configuration"> | |
</a> | ||
, as, after the docker services are running, one can attach to it and start developing using all VSCode features, including version control and debugging. | ||
</p> | ||
<p> | ||
To ease writing DEV configuration, a dev template is provided | ||
<a href="https://github.com/SciCatProject/scicatlive/blob/main/services/compose.dev.yaml"> | ||
here | ||
</a> | ||
and each component inhearits from it, as you can see | ||
<a href="https://github.com/SciCatProject/scicatlive/blob/main/services/frontend/compose.dev.yaml"> | ||
here | ||
</a> | ||
setting the componenent specific variables from the relative | ||
<a href="https://github.com/SciCatProject/scicatlive/blob/main/services/frontend/.env"> | ||
.env file | ||
</a> | ||
. | ||
<img alt="⚠" class="twemoji" src="https://cdn.jsdelivr.net/gh/jdecked/[email protected]/assets/svg/26a0.svg" title=":warning:"/> | ||
Docker compose applies a | ||
<a href="https://docs.docker.com/compose/how-tos/environment-variables/variable-interpolation/#local-env-file-versus-project-directory-env-file"> | ||
precedence mechanism | ||
</a> | ||
whenever the same variable is defined in | ||
<code> | ||
.env | ||
</code> | ||
files in nested folders, with precedence to the folder where the default | ||
<code> | ||
COMPOSE_FILE | ||
</code> | ||
lives. This means that the current template cannot be used in case of nested components, at least for the parts where local variables are used. There is no conflict with variables defined multiple times in | ||
<code> | ||
.env | ||
</code> | ||
files at the same level. | ||
</p> | ||
<p> | ||
<img alt="⚠" class="twemoji" src="https://cdn.jsdelivr.net/gh/jdecked/[email protected]/assets/svg/26a0.svg" title=":warning:"/> | ||
To prevent git unpushed changes from being lost when a container is restarted, the work folder of each service, when in DEV mode, is mounted to a docker volume, with naming convention | ||
|
@@ -2052,18 +2085,23 @@ <h4 id="dev-configuration"> | |
<a href="https://github.com/SciCatProject/scicatlive/blob/main/services/frontend/compose.dev.yaml"> | ||
GITHUB_REPO | ||
</a> | ||
including the branch using the same syntax and value as the build context). | ||
</p> | ||
<p> | ||
e.g., for the frontend: | ||
including the branch using the same syntax and value as the build context). You can achieve this, by setting the | ||
<code> | ||
GITHUB_REPO | ||
</code> | ||
env variable in the component | ||
<code> | ||
.env | ||
</code> | ||
file (e.g. the | ||
<a href="https://github.com/SciCatProject/scicatlive/blob/main/services/frontend/.env"> | ||
frontend env file | ||
</a> | ||
) as follows: | ||
</p> | ||
<div class="highlight"> | ||
<pre><span></span><code><span class="w"> </span> build: | ||
<span class="gd">- context: https://github.com/SciCatProject/frontend.git</span> | ||
<span class="gi">+ context: https://github.com/SciCatProject/frontend.git#v4.4.1</span> | ||
<span class="w"> </span> environment: | ||
<span class="gd">- GITHUB_REPO: https://github.com/SciCatProject/frontend.git</span> | ||
<span class="gi">+ GITHUB_REPO: https://github.com/SciCatProject/frontend.git#v4.4.1</span> | ||
<pre><span></span><code><span class="gd">- GITHUB_REPO=https://github.com/SciCatProject/frontend.git</span> | ||
<span class="gi">+ GITHUB_REPO=https://github.com/SciCatProject/frontend.git#v4.4.1</span> | ||
</code></pre> | ||
</div> | ||
<p> | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
13 changes: 4 additions & 9 deletions
13
main/services/backend/services/v3/services/archivemock/compose.dev.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
services: | ||
web-app: | ||
entrypoint: loop_entrypoints.sh | ||
command: infinite_loop.sh | ||
healthcheck: | ||
test: pgrep -f "/bin/sh /usr/local/bin/infinite_loop.sh" | ||
retries: 10 | ||
labels: | ||
- traefik.http.services.${APP}.loadbalancer.server.port=${DEV_PORT} | ||
volumes: | ||
# These volumes allow to run init scripts before running the service | ||
- ${PWD}/entrypoints/loop_entrypoints.sh:/usr/local/bin/loop_entrypoints.sh | ||
- ${PWD}/entrypoints/infinite_loop.sh:/usr/local/bin/infinite_loop.sh | ||
- ${PWD}/entrypoints/setup_git.sh:/docker-entrypoints/0.sh | ||
environment: | ||
GITHUB_REPO: ${GITHUB_REPO:-} | ||
node-app-from-local: | ||
extends: web-app | ||
volumes: | ||
# This prevents git unpushed changes from being lost on container restart | ||
- ${DEV_VOLUME:-${APP}}_dev:${WORKDIR:-/home/node/app} | ||
# These allow to keep changes from npm install/build from Dockerfile CMDs | ||
- ${WORKDIR:-/home/node/app}/dist | ||
- ${WORKDIR:-/home/node/app}/node_modules | ||
node-app-from-remote: | ||
extends: node-app-from-local | ||
image: '' | ||
build: | ||
context: ${GITHUB_REPO:-} |
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