Skip to content

Commit

Permalink
yolo
Browse files Browse the repository at this point in the history
  • Loading branch information
Ereiarrus committed Jan 30, 2024
1 parent 9c74fe0 commit f66067b
Show file tree
Hide file tree
Showing 27 changed files with 1,265 additions and 1,323 deletions.
4 changes: 2 additions & 2 deletions .github/actions/python-init/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ runs:
with:
secrets: ${{ inputs.secrets }}

- name: Set up Python 3.10
- name: Set up Python 3.12
uses: actions/setup-python@v3
with:
python-version: "3.10"
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@ jobs:
echo "TMI_TOKEN=${{ secrets.TMI_TOKEN }}" > src/.env
echo "DATABASE_URL=${{ secrets.DATABASE_URL }}" >> src/.env
echo "CLIENT_SECRET=${{ secrets.CLIENT_SECRET }}" >> src/.env
echo "STATUS_FILE=${{ secrets.STATUS_FILE }}" >> src/.env
chmod +x ./docker_build.sh
chmod +x ./docker_run.sh
./docker_run.sh "${{ secrets.STATUS_FILE }}"
./docker_run.sh
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
.firebase_config.json
src/.*firebase_config.json
testing.py
testing*
err_log.txt
.idea

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
3 changes: 0 additions & 3 deletions .idea/.gitignore

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/ComplementsBotPy.iml

This file was deleted.

5 changes: 0 additions & 5 deletions .idea/codeStyles/codeStyleConfig.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/inspectionProfiles/profiles_settings.xml

This file was deleted.

7 changes: 0 additions & 7 deletions .idea/misc.xml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

19 changes: 14 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
# syntax=docker/dockerfile:1

FROM python:3.10-alpine
FROM python:3.12-alpine
WORKDIR /complements-bot-py
ENV PYTHONPATH /complements-bot-py
COPY src ./src
COPY main.py .
RUN rm -rf ./src/test_complements_bot
RUN pip install -r ./src/requirements.txt
RUN pip install pipenv
RUN apk add --no-cache \
gcc \
musl-dev \
python3-dev \
libffi-dev \
openssl-dev \
cargo \
build-base
RUN cd ./src; pipenv install --system --deploy; cd ..
RUN apk add python3-dev
RUN apk add build-base
RUN pip install cython
RUN python -m cython -3 --embed -o main.c main.py
RUN gcc -Os -I /usr/include/python3.10 -o main main.c -lpython3.10 -lpthread -lm -lutil -ldl
EXPOSE 50994/tcp
EXPOSE 50995/tcp
RUN gcc -Os -I /usr/include/python3.12 -o main main.c -lpython3.12 -lpthread -lm -lutil -ldl
# EXPOSE 50994/tcp
# EXPOSE 50995/tcp
CMD ["./main"]
14 changes: 11 additions & 3 deletions Dockerfile.compile
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
# syntax=docker/dockerfile:1

FROM python:3.10-alpine
FROM python:3.12-alpine
WORKDIR /src
COPY src .
RUN pip install -r requirements.txt
RUN pip install mypy flake8 pylint types-aiofiles
RUN pip install pipenv
RUN apk add --no-cache \
gcc \
musl-dev \
python3-dev \
libffi-dev \
openssl-dev \
cargo \
build-base
RUN pipenv install --system --dev
14 changes: 11 additions & 3 deletions Dockerfile.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
# syntax=docker/dockerfile:1

FROM python:3.10-alpine
FROM python:3.12-alpine
WORKDIR /src
COPY src .
RUN pip install -r requirements.txt
RUN pip install pytest bandit
RUN pip install pipenv
RUN apk add --no-cache \
gcc \
musl-dev \
python3-dev \
libffi-dev \
openssl-dev \
cargo \
build-base
RUN pipenv install --system --dev
15 changes: 0 additions & 15 deletions Pipfile

This file was deleted.

213 changes: 0 additions & 213 deletions Pipfile.lock

This file was deleted.

Loading

0 comments on commit f66067b

Please sign in to comment.