This repository has been archived by the owner on Mar 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
745cd22
commit 4b2e001
Showing
11 changed files
with
67 additions
and
30 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 |
---|---|---|
@@ -1,11 +1,18 @@ | ||
FROM python:3.11 | ||
FROM ghcr.io/ad-sdl/wei | ||
|
||
RUN mkdir -p /webcam_module | ||
LABEL org.opencontainers.image.source=https://github.com/AD-SDL/webcam_module | ||
LABEL org.opencontainers.image.description="An example module that implements a simple webcam snapshot action" | ||
LABEL org.opencontainers.image.licenses=MIT | ||
|
||
COPY ./src /webcam_module/src | ||
COPY ./README.md /webcam_module/README.md | ||
COPY ./pyproject.toml /webcam_module/pyproject.toml | ||
USER wei | ||
WORKDIR /home/wei | ||
|
||
RUN mkdir -p webcam_module | ||
|
||
COPY --chown=wei:wei ./src webcam_module/src | ||
COPY --chown=wei:wei ./README.md webcam_module/README.md | ||
COPY --chown=wei:wei ./pyproject.toml webcam_module/pyproject.toml | ||
|
||
RUN pip install ./webcam_module | ||
|
||
CMD ["python", "/webcam_module/src/webcam_rest_node.py"] | ||
CMD ["python", "webcam_module/src/webcam_rest_node.py"] |
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 |
---|---|---|
@@ -1,13 +1,11 @@ | ||
#!/bin/bash | ||
#!/usr/bin/env bash | ||
|
||
SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" | ||
source "$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"/script_helper.sh | ||
|
||
version=`$SCRIPTPATH/version.sh` | ||
name=`$SCRIPTPATH/name.sh` | ||
|
||
cd $SCRIPTPATH/.. | ||
cd $project_path | ||
|
||
docker build \ | ||
-t ghcr.io/ad-sdl/${name}:${version} \ | ||
-t ghcr.io/ad-sdl/${name}:dev \ | ||
-t ghcr.io/ad-sdl/${project_name}:${project_version} \ | ||
-t ghcr.io/ad-sdl/${project_name}:dev \ | ||
-t ghcr.io/ad-sdl/${project_name}:latest \ | ||
. |
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,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
source "$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"/script_helper.sh | ||
cd $project_path | ||
|
||
docker compose logs "$@" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
#!/bin/bash | ||
#!/usr/bin/env bash | ||
|
||
SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" | ||
source "$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"/script_helper.sh | ||
|
||
version=`$SCRIPTPATH/version.sh` | ||
name=`$SCRIPTPATH/name.sh` | ||
$scripts_path/build.sh | ||
|
||
docker push ghcr.io/ad-sdl/${name}:${version} | ||
docker push ghcr.io/ad-sdl/${project_name}:${project_version} |
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,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
source "$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"/script_helper.sh | ||
cd $project_path | ||
|
||
docker compose restart |
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,19 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Invoke this helper from other scripts in the scripts dir of a project with: | ||
# source "$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"/script_helper.sh | ||
|
||
USER_ID=$(id -u) | ||
GROUP_ID=$(id -g) | ||
|
||
scripts_path="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" | ||
cd $scripts_path | ||
project_path=`git rev-parse --show-toplevel` | ||
if [[ -f ${project_path}/pyproject.toml ]]; then | ||
project_name=`grep -oP '(?<=name = ")[^"]+' $project_path/pyproject.toml | head -n 1` | ||
project_version=`grep -oP '(?<=version = ")[^"]+' $project_path/pyproject.toml | head -n 1` | ||
else | ||
project_name=`basename $project_path` | ||
project_version="0.0.0" | ||
fi | ||
|
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,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
source "$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"/script_helper.sh | ||
cd $project_path | ||
|
||
docker compose up "$@" |
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,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
source "$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"/script_helper.sh | ||
cd $project_path | ||
|
||
docker compose down |
This file was deleted.
Oops, something went wrong.