Let's just push the containers manually for now

This commit is contained in:
Mustafa Gezen 2023-02-02 03:31:10 +01:00
parent f27b5d354d
commit faeda45001
Signed by untrusted user who does not match committer: mustafa
GPG Key ID: DCDF010D946438C1
5 changed files with 58 additions and 4 deletions

4
.dockerignore Normal file
View File

@ -0,0 +1,4 @@
node_modules
.venv
.ijwb
.idea

View File

@ -18,10 +18,21 @@ jobs:
with:
path: "~/.cache/bazel"
key: bazel
- name: Log into GCR
- name: Log into GHCR
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin
- name: Push containers
run: |
bazel run //apollo/server:server.push
bazel run //apollo/rpmworker:rpmworker.push
bazel run //apollo/rhworker:rhworker.push
export BUILD_TAG="${GIT_COMMIT:-$(git describe --tags --long --always)}"
bazel build //apollo/server/static
rm -rf apollo/server/static/*
cp bazel-bin/apollo/server/static/*.css apollo/server/static/
cp bazel-bin/apollo/server/static/*.js apollo/server/static/
cp bazel-bin/apollo/server/static/*.map apollo/server/static/
docker build -t ghcr.io/resf/apollo-server:$BUILD_TAG -f apollo/server/Dockerfile .
docker build -t ghcr.io/resf/apollo-rpmworker:$BUILD_TAG -f apollo/rpmworker/Dockerfile .
docker build -t ghcr.io/resf/apollo-rhworker:$BUILD_TAG -f apollo/rhworker/Dockerfile .
docker push ghcr.io/resf/apollo-server:$BUILD_TAG
docker push ghcr.io/resf/apollo-rpmworker:$BUILD_TAG
docker push ghcr.io/resf/apollo-rhworker:$BUILD_TAG

View File

@ -0,0 +1,13 @@
FROM rockylinux:9
WORKDIR /app
RUN dnf update -y && dnf install -y python3 python3-pip
RUN python3 -m venv /opt/venv
COPY requirements_lock.txt .
RUN /opt/venv/bin/pip3 install -r requirements_lock.txt
COPY . .
CMD ["/opt/venv/bin/python3", "-m", "apollo.rhworker"]

View File

@ -0,0 +1,13 @@
FROM rockylinux:9
WORKDIR /app
RUN dnf update -y && dnf install -y python3 python3-pip
RUN python3 -m venv /opt/venv
COPY requirements_lock.txt .
RUN /opt/venv/bin/pip3 install -r requirements_lock.txt
COPY . .
CMD ["/opt/venv/bin/python3", "-m", "apollo.rpmworker"]

13
apollo/server/Dockerfile Normal file
View File

@ -0,0 +1,13 @@
FROM rockylinux:9
WORKDIR /app
RUN dnf update -y && dnf install -y python3 python3-pip
RUN python3 -m venv /opt/venv
COPY requirements_lock.txt .
RUN /opt/venv/bin/pip3 install -r requirements_lock.txt
COPY . .
CMD ["/opt/venv/bin/python3", "-m", "hypercorn", "apollo.server.server", "--bind", "0.0.0.0:8000"]