mirror of https://github.com/l3uddz/traktarr
commit
966e34ab60
@ -1,23 +1,42 @@
|
||||
# Git
|
||||
.git
|
||||
# User-specific stuff:
|
||||
.idea
|
||||
|
||||
# Systemd files
|
||||
systemd
|
||||
## File-based project format:
|
||||
*.iws
|
||||
|
||||
# Logs
|
||||
*.log*
|
||||
|
||||
# Configs
|
||||
*.json
|
||||
# IntelliJ
|
||||
/out/
|
||||
|
||||
# Byte-compiled / optimized / DLL files
|
||||
**/__pycache__
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
*.pyc
|
||||
|
||||
# logs
|
||||
*.log*
|
||||
|
||||
# databases
|
||||
*.db
|
||||
|
||||
# configs
|
||||
*.cfg
|
||||
*.json
|
||||
|
||||
# generators
|
||||
*.bat
|
||||
|
||||
# Pyenv
|
||||
**/.python-version
|
||||
|
||||
# User-specific stuff:
|
||||
.idea
|
||||
# PyInstaller
|
||||
build/
|
||||
dist/
|
||||
*.manifest
|
||||
*.spec
|
||||
|
||||
# Git
|
||||
.git
|
||||
|
||||
# Systemd
|
||||
systemd
|
||||
|
@ -1,22 +1,22 @@
|
||||
FROM python:3.6-alpine3.7
|
||||
|
||||
# Arguments for build tracking
|
||||
ARG BRANCH=
|
||||
ARG COMMIT=
|
||||
|
||||
ENV \
|
||||
# App directory
|
||||
APP_DIR=traktarr \
|
||||
# Branch to clone
|
||||
BRANCH=master \
|
||||
# Config file
|
||||
BRANCH=${BRANCH} \
|
||||
COMMIT=${COMMIT} \
|
||||
TRAKTARR_CONFIG=/config/config.json \
|
||||
# Log file
|
||||
TRAKTARR_LOGFILE=/config/traktarr.log
|
||||
|
||||
COPY . /${APP_DIR}
|
||||
|
||||
RUN \
|
||||
echo "** BRANCH: ${BRANCH} COMMIT: ${COMMIT} **" && \
|
||||
echo "** Upgrade all packages **" && \
|
||||
apk --no-cache -U upgrade && \
|
||||
echo "** Install OS dependencies **" && \
|
||||
apk --no-cache -U add git && \
|
||||
echo "** Get Traktarr **" && \
|
||||
git clone --depth 1 --branch ${BRANCH} https://github.com/l3uddz/traktarr.git /${APP_DIR} && \
|
||||
echo "** Install PIP dependencies **" && \
|
||||
pip install --no-cache-dir --upgrade pip setuptools && \
|
||||
pip install --no-cache-dir --upgrade -r /${APP_DIR}/requirements.txt
|
@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Docker cloud bug ?, working directory is not set acording to the config
|
||||
cd ..
|
||||
|
||||
docker build --build-arg BRANCH=${SOURCE_BRANCH} --build-arg COMMIT=${SOURCE_COMMIT} -f ${DOCKERFILE_PATH} -t ${IMAGE_NAME} .
|
Loading…
Reference in new issue