Skip to content

Commit

Permalink
python3.12 support. remove supervisor. update docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
cybergrind committed Jul 24, 2024
1 parent e4e6964 commit 83f5955
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 104 deletions.
1 change: 1 addition & 0 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
- '3.9'
- '3.10'
- '3.11'
- '3.12'
name: create and save container
runs-on: ubuntu-20.04
steps:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
- '3.9'
- '3.10'
- '3.11'
- '3.12'
name: create and save container
runs-on: ubuntu-20.04
steps:
Expand Down Expand Up @@ -40,6 +41,6 @@ jobs:
password: ${{ secrets.GHCR_TOKEN }}
- run: docker pull ghcr.io/micro-fan/python:latest || true
- run: >
PY_VERSION=python3.11
PY_VERSION=python3.12
TAG_NAME=latest
make push_ghcr_image
9 changes: 1 addition & 8 deletions Dockerfile.base_python
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ RUN echo '30 Jun 2023'
ENV LANG C.UTF-8
ENV LANGUAGE C.UTF-8
ENV LC_ALL C.UTF-8
ENV SUPERVISOR_CONFIG supervisor-app.conf
ENV LOG_DIR /var/log/fan_logs
ENV PYTHONPATH=.
ARG PY_VERSION=python3.9
Expand All @@ -18,10 +17,4 @@ ENV LOGSTASH_HOST localhost
ARG BUILD_HELM=1
COPY base_python/*.sh ./
RUN ./install_basic_packages.sh
RUN ./install_helm_packages.sh

COPY base_python/bootstrap/ /bootstrap
WORKDIR /bootstrap
RUN ./prepare_environment.py

CMD /bootstrap_env/bin/python /bootstrap/bootstrap.py
RUN ./install_helm_packages.sh
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ ENV PGPORT=5432
ENV PGDATABASE=web_database
ENV CONTAINER_TYPE=web
ENV LOG_DIR=/var/log/web_logs
ENV SUPERVISOR_CONFIG=infra/web/supervisor-app.conf
ENV PYTHONPATH=/home/code/backend:$PYTHONPATH

ADD backend/requirements.txt /home/code/backend/requirements.txt
Expand Down
30 changes: 0 additions & 30 deletions base_python/bootstrap/bootstrap.py

This file was deleted.

29 changes: 0 additions & 29 deletions base_python/bootstrap/prepare_environment.py

This file was deleted.

1 change: 0 additions & 1 deletion base_python/bootstrap/requirements.txt

This file was deleted.

Empty file.
28 changes: 0 additions & 28 deletions base_python/bootstrap/supervisord.conf

This file was deleted.

12 changes: 6 additions & 6 deletions base_python/install_basic_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ apt -y install ${PY_VERSION} ${PY_VERSION}-venv ${PY_VERSION}-dev
update-alternatives --install /usr/bin/python python /usr/bin/${PY_VERSION} 1
update-alternatives --install /usr/bin/python3 python3 /usr/bin/${PY_VERSION} 1

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
${PY_VERSION} get-pip.py

python3 -m pip install -U setuptools wheel supervisor
python3 -m pip install pillow uwsgi psycopg2-binary fan-tools==3.* awscli~=1.27.164 docker-compose
python3 -m ensurepip
python3 -m pip uninstall --root-user-action=ignore -y six
python3 -m pip install --root-user-action=ignore fan-tools==3.* awscli>=1.27.164 six

cd /usr/local/bin/

KUBE_RELEASE=v1.26.6
COMPOSE_VERSION=v2.29.1
curl -SL https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose && chmod +x /usr/local/bin/docker-compose
KUBE_RELEASE=v1.29.7
curl -LO "https://dl.k8s.io/release/${KUBE_RELEASE}/bin/linux/amd64/kubectl"
curl -LO https://github.com/ahmetb/kubectx/releases/download/v0.9.5/kubens
curl -LO https://github.com/ahmetb/kubectx/releases/download/v0.9.5/kubectx
Expand Down

0 comments on commit 83f5955

Please sign in to comment.