Skip to content

Commit add5570

Browse files
Merge pull request #10 from UCSD-Makerspace/chore/stabilize
chore/stabilize
2 parents 1e6ed8c + 1cab41b commit add5570

71 files changed

Lines changed: 1174 additions & 2273 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Build and Push
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
concurrency:
10+
group: production_environment
11+
cancel-in-progress: true
12+
13+
jobs:
14+
build-and-push:
15+
runs-on: ubuntu-24.04-arm
16+
permissions:
17+
contents: read
18+
packages: write
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Set lowercase repository owner
23+
id: lowercase
24+
run: echo "owner=$(echo '${{ github.repository_owner }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
25+
26+
- name: Set up Docker Buildx
27+
uses: docker/setup-buildx-action@v3
28+
29+
- name: Login to GitHub Container Registry
30+
uses: docker/login-action@v3
31+
with:
32+
registry: ghcr.io
33+
username: ${{ github.actor }}
34+
password: ${{ secrets.GITHUB_TOKEN }}
35+
36+
- name: Build and push
37+
uses: docker/build-push-action@v5
38+
with:
39+
context: .
40+
push: true
41+
tags: |
42+
ghcr.io/${{ steps.lowercase.outputs.owner }}/check-in:${{ github.sha }}
43+
ghcr.io/${{ steps.lowercase.outputs.owner }}/check-in:latest

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ log*
66
.venv/
77
/src/assets/local_user_db.json
88
.idea/
9-
ignore-*
9+
ignore-*
10+
.env
11+
raw_*

Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM python:3.13-slim
2+
3+
RUN apt-get update && apt-get install -y \
4+
python3-tk \
5+
gcc \
6+
python3-dev \
7+
&& rm -rf /var/lib/apt/lists/*
8+
9+
WORKDIR /app
10+
11+
COPY requirements.txt .
12+
RUN pip install --no-cache-dir -r requirements.txt
13+
14+
COPY src/ src/
15+
16+
ENV PYTHONPATH=/app/src
17+
18+
CMD ["python", "src/main.py"]

docker-compose.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
services:
2+
check-in:
3+
image: ghcr.io/ucsd-makerspace/check-in:latest
4+
privileged: true
5+
network_mode: host
6+
environment:
7+
- DISPLAY=:0
8+
- XAUTHORITY=/home/makeradmin/.Xauthority
9+
- CHECK_IN_API_URL=http://10.8.0.1:8000
10+
volumes:
11+
- /tmp/.X11-unix:/tmp/.X11-unix
12+
- /home/makeradmin/.Xauthority:/home/makeradmin/.Xauthority:ro
13+
restart: unless-stopped
14+
15+
watchtower:
16+
image: ghcr.io/nicholas-fedor/watchtower:latest
17+
volumes:
18+
- /var/run/docker.sock:/var/run/docker.sock
19+
# Testing: check every 30 seconds
20+
command: --interval 30
21+
# Production: swap the line above for the two below to check every 5 minutes overnight only (midnight–6am)
22+
# command: --schedule "0 */5 0-5 * * *"
23+
restart: unless-stopped

requirements.txt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
authlib==1.5.0
2-
gspread==6.1.4
3-
gspread-formatting==1.2.1
4-
oauth2client==4.1.3
51
pyserial==3.5
6-
Requests==2.32.3
2+
requests==2.32.5
3+
adafruit-circuitpython-pn532
4+
RPi.GPIO; sys_platform == 'linux'

src/AccNoWaiver.py

Lines changed: 0 additions & 54 deletions
This file was deleted.

src/AccNoWaiverSwipe.py

Lines changed: 0 additions & 124 deletions
This file was deleted.

0 commit comments

Comments
 (0)