slim images, building docker container from github actions
This commit is contained in:
parent
c88c8e9f26
commit
d0b2bba7ca
@ -1,6 +1,10 @@
|
|||||||
|
.github
|
||||||
.idea
|
.idea
|
||||||
|
.jenkins
|
||||||
.git
|
.git
|
||||||
__pycache__
|
.venv
|
||||||
|
.vscode
|
||||||
|
**/__pycache__
|
||||||
service.json
|
service.json
|
||||||
build
|
build
|
||||||
docs
|
docs
|
||||||
|
28
.github/workflows/ci.yml
vendored
28
.github/workflows/ci.yml
vendored
@ -117,6 +117,34 @@ jobs:
|
|||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./public
|
publish_dir: ./public
|
||||||
|
|
||||||
|
package:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [build] # for ignoring bad builds
|
||||||
|
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v2
|
||||||
|
|
||||||
|
- name: Login to DockerHub
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Build & Push Container
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
push: true
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
tags: sarsoo/mixonomer:latest
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: build # for ignoring bad builds
|
needs: build # for ignoring bad builds
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
FROM node:19 AS js-build
|
FROM node:19-alpine AS js-build
|
||||||
|
|
||||||
RUN npm install -g sass
|
RUN npm install -g sass
|
||||||
|
|
||||||
@ -14,7 +14,7 @@ RUN npm ci
|
|||||||
RUN npm run build --if-present
|
RUN npm run build --if-present
|
||||||
RUN sass src/scss/style.scss build/style.css
|
RUN sass src/scss/style.scss build/style.css
|
||||||
|
|
||||||
FROM python:3.10 as py
|
FROM python:3.10-slim as py
|
||||||
|
|
||||||
RUN pip install poetry
|
RUN pip install poetry
|
||||||
RUN poetry config virtualenvs.create false
|
RUN poetry config virtualenvs.create false
|
||||||
@ -27,7 +27,8 @@ COPY poetry.lock .
|
|||||||
RUN poetry install
|
RUN poetry install
|
||||||
RUN poetry add gunicorn
|
RUN poetry add gunicorn
|
||||||
|
|
||||||
COPY . ./
|
COPY ./music ./music
|
||||||
|
COPY gunicorn.conf.py gunicorn.conf.py
|
||||||
COPY main.api.py main.py
|
COPY main.api.py main.py
|
||||||
COPY --from=js-build /mixonomer/build ./build/
|
COPY --from=js-build /mixonomer/build ./build/
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user