-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
58 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,8 @@ | ||
.git | ||
.github | ||
.git | ||
.pytest_cache | ||
.vscode | ||
build | ||
dist | ||
env | ||
seedboxsync.egg-info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,49 @@ | ||
FROM python:3.12-alpine | ||
# | ||
# Build | ||
# | ||
FROM python:3.12-alpine as builder | ||
|
||
WORKDIR /src | ||
|
||
ENV PYTHONDONTWRITEBYTECODE 1 | ||
ENV PYTHONUNBUFFERED 1 | ||
|
||
COPY . /src | ||
RUN pip install --no-cache-dir cement && \ | ||
pip wheel --no-cache-dir --no-deps --wheel-dir /src/wheels -r requirements.txt && \ | ||
pip wheel --no-cache-dir --no-deps --wheel-dir /src/wheels . | ||
|
||
|
||
LABEL maintainer="Guillaume Kulakowski <guillaume@kulakowski.fr>" | ||
ENV PS1="\[\e[0;33m\]|> seedboxsync <| \[\e[1;35m\]\W\[\e[0m\] \[\e[0m\]# " | ||
|
||
# | ||
# Prod | ||
# | ||
FROM python:3.12-alpine | ||
|
||
# Non root user | ||
RUN adduser -D seedboxsync | ||
|
||
WORKDIR /src | ||
COPY . /src | ||
|
||
# Add cement for setup.py before | ||
RUN pip install --no-cache-dir cement && \ | ||
# Install SeedboxSync \ | ||
pip install --no-cache-dir . && \ | ||
# System folders \ | ||
mkdir /config && \ | ||
mkdir /download && \ | ||
# System folders | ||
RUN mkdir /config && \ | ||
mkdir /downloads && \ | ||
mkdir /watch && \ | ||
chown -R seedboxsync:seedboxsync /config /download /watch && \ | ||
# Seedboxsync folders | ||
mkdir ~seedboxsync/.config && \ | ||
ln -s /config ~seedboxsync/.config/seedboxsync && \ | ||
ln -s /download ~seedboxsync/Downloads && \ | ||
ln -s /watch ~seedboxsync/watch && \ | ||
cp config/seedboxsync.yml.example /config/seedboxsync.yml && \ | ||
chown -R seedboxsync:seedboxsync ~seedboxsync/.config && \ | ||
# Cleanup \ | ||
chown -R seedboxsync:seedboxsync /config /downloads /watch | ||
|
||
# Add cement for setup.py before | ||
COPY --from=builder /src/wheels wheels | ||
RUN pip install --no-cache-dir wheels/* && \ | ||
rm -rf /src | ||
|
||
USER seedboxsync | ||
# Seedboxsync folders | ||
RUN mkdir ~seedboxsync/.config && \ | ||
ln -s /config ~seedboxsync/.config/seedboxsync && \ | ||
ln -s /downloads ~seedboxsync/Downloads && \ | ||
ln -s /watch ~seedboxsync/watch && \ | ||
cp /usr/local/config/seedboxsync.yml.example /config/seedboxsync.yml | ||
|
||
WORKDIR /home/seedboxsync | ||
|
||
ENTRYPOINT ["/usr/local/bin/seedboxsync"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Copyright (C) 2015-2024 Guillaume Kulakowski <guillaume@kulakowski.fr> | ||
# | ||
# For the full copyright and license information, please view the LICENSE | ||
# file that was distributed with this source code. | ||
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Copyright (C) 2015-2024 Guillaume Kulakowski <guillaume@kulakowski.fr> | ||
# | ||
# For the full copyright and license information, please view the LICENSE | ||
# file that was distributed with this source code. | ||
# |