-
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
Benjamin Bichsel
committed
Dec 27, 2020
1 parent
437af61
commit 69fd9aa
Showing
6 changed files
with
94 additions
and
97 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,23 +1,11 @@ | ||
FROM selenium/standalone-firefox-debug | ||
|
||
USER root | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
python3 \ | ||
python3-pip \ | ||
&& apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
USER seluser | ||
FROM python:3.8 | ||
|
||
RUN pip3 install \ | ||
selenium \ | ||
pandas \ | ||
xlrd | ||
|
||
# automatically start | ||
RUN mkdir -p /home/seluser/logs | ||
RUN echo "/opt/bin/entry_point.sh > /home/seluser/logs/$(date +%Y-%m-%d_%H-%M-%S).log &" >> /home/seluser/.bashrc | ||
selenium==3.141.0 \ | ||
pandas==1.1.5 \ | ||
xlrd==2.0.1 | ||
|
||
WORKDIR "/sportdb-helper" | ||
COPY --chown=seluser . . | ||
COPY . . | ||
|
||
ENTRYPOINT ["python3", "./code/insert_data.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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,18 +23,23 @@ Aufgrund dieser Daten füllt SportDB Helper automatisch die Anwesenheitskontroll | |
|
||
Die folgende Installationsanleitung ist für Ubuntu gedacht. Andere Systeme sollten analog verwendbar sein (nicht getestet, Anpassung braucht Erfahrung). | ||
|
||
Um SportDB Helfer zu verwenden, brauchst du [docker](https://docs.docker.com/install/), `git` und `make`: | ||
Um SportDB Helfer zu verwenden, brauchst du | ||
[docker](https://docs.docker.com/install/), | ||
[docker-compose](https://docs.docker.com/compose/) und `git`: | ||
|
||
- Um `git` und `make` zu installieren: | ||
``` | ||
# for git | ||
sudo apt-get install git-all | ||
# for make | ||
sudo apt-get install build-essential | ||
- Um `git` zu installieren: | ||
|
||
```bash | ||
# git | ||
sudo apt-get install git-all | ||
# optional: vnc client, um den Prozess live zu beobachten | ||
sudo apt-get install vinagre --yes | ||
``` | ||
|
||
- Docker auf Ubuntu installieren: https://docs.docker.com/install/linux/docker-ce/ubuntu/. | ||
- Docker auf Ubuntu installieren: | ||
https://docs.docker.com/install/linux/docker-ce/ubuntu/. | ||
|
||
- Docker Compose auf Ubuntu installieren: https://docs.docker.com/compose/install/#install-compose-on-linux-systems | ||
|
||
- Herunterladen von SportDB Helper: | ||
|
||
|
@@ -43,18 +48,6 @@ git clone [email protected]:bichselb/sportdb-helper.git | |
cd sportdb-helper | ||
``` | ||
|
||
- Installation von SportDP Helper (fragt nach dem Passwort für die Interaktion mit docker): | ||
|
||
```bash | ||
make image | ||
``` | ||
|
||
- (Optional) Cleanup nach Verwendung (fragt nach dem Passwort für die Interaktion mit docker): | ||
|
||
```bash | ||
make clean | ||
``` | ||
|
||
### SportDB Helper | ||
|
||
Um SportDB Helper laufen zu lassen (fragt nach dem Passwort für die Interaktion mit docker): | ||
|
@@ -65,7 +58,7 @@ Um SportDB Helper laufen zu lassen (fragt nach dem Passwort für die Interaktion | |
``` | ||
|
||
ACHTUNG: Die `course-id` ist nicht dasselbe wie die "Angebot"-Nummer. Die | ||
`course-id` findest du, wenn du in der URL deines Kurses, z.B.: | ||
`course-id` findest du in der URL deines Kurses, z.B. 1234567 in folgender URL: | ||
|
||
- https://www.sportdb.ch/extranet/kurs/kursEdit.do?kursId=1234567&org.apache.struts.taglib.html.TOKEN=0000000000000000000000000 | ||
|
||
|
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,22 @@ | ||
version: '2.4' | ||
services: | ||
selenium: | ||
image: selenium/standalone-firefox:4.0.0-beta-1-prerelease-20201208 | ||
ports: | ||
- "5901:5900" # port for vnc (host:container) | ||
expose: | ||
- "4444" | ||
healthcheck: | ||
test: "opt/bin/check-grid.sh" # allow waiting until started | ||
environment: | ||
- VNC_NO_PASSWORD=1 # disable vnc password | ||
volumes: | ||
- /dev/shm:/dev/shm # known workaround suggested by selenium | ||
sportdb-helper: | ||
build: . | ||
#ports: | ||
# - "4444:4444" # port of selenium | ||
depends_on: | ||
selenium: | ||
condition: service_healthy # wait until selenium is ready | ||
container_name: sportdb-helper-container |
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