Skip to content

Commit

Permalink
lots of changes because methods attempted for recovery weren't workin…
Browse files Browse the repository at this point in the history
…g anyway
  • Loading branch information
Ereiarrus committed Jan 29, 2024
1 parent 3a1e84c commit b39b1e1
Show file tree
Hide file tree
Showing 32 changed files with 1,329 additions and 1,338 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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.firebase_config.json
src/.*firebase_config.json
testing.py
testing*
err_log.txt

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

This file was deleted.

6 changes: 5 additions & 1 deletion .idea/ComplementsBotPy.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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

This file was deleted.

22 changes: 22 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 56 additions & 0 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# 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 -r ./src/requirements.txt
RUN cd ./src; pipenv install --system; 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"]
16 changes: 13 additions & 3 deletions Dockerfile.compile
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
# 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 -r requirements.txt
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
# RUN pip install mypy flake8 pylint types-aiofiles
8 changes: 5 additions & 3 deletions Dockerfile.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# 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 -r requirements.txt
RUN pip install pipenv
RUN pipenv install --system --dev
# RUN pip install pytest bandit
15 changes: 0 additions & 15 deletions Pipfile

This file was deleted.

Loading

0 comments on commit b39b1e1

Please sign in to comment.