mirror of
https://github.com/zoffline/zwift-offline.git
synced 2026-08-02 17:08:14 -07:00
@@ -0,0 +1,27 @@
|
||||
name: ci
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Login to DockerHub
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/zoffline:latest
|
||||
+12
-3
@@ -1,12 +1,21 @@
|
||||
FROM python:3-alpine as builder
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
RUN apk add --no-cache git gcc g++ musl-dev libffi-dev openssl-dev file make
|
||||
RUN pip install --user flask flask_sqlalchemy flask-login pyjwt gevent protobuf protobuf3_to_dict stravalib garmin-uploader requests
|
||||
|
||||
RUN git clone --depth 1 https://github.com/zoffline/zwift-offline
|
||||
|
||||
FROM python:3-alpine
|
||||
MAINTAINER zoffline <zoffline@tutanota.com>
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
RUN apk add --no-cache git gcc g++ musl-dev libffi-dev openssl-dev file make
|
||||
RUN pip install flask flask_sqlalchemy flask-login pyjwt gevent protobuf protobuf3_to_dict stravalib garmin-uploader requests
|
||||
COPY --from=builder /root/.local/ /root/.local/
|
||||
ENV PATH=/root/.local/bin:$PATH
|
||||
|
||||
RUN git clone --depth 1 https://github.com/zoffline/zwift-offline
|
||||
COPY --from=builder /usr/src/app/zwift-offline/ zwift-offline/
|
||||
RUN chmod 777 zwift-offline/storage
|
||||
|
||||
EXPOSE 443 80 3022/udp 3023
|
||||
|
||||
Reference in New Issue
Block a user