-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: use python package (setup.py)
- Loading branch information
Showing
8 changed files
with
33 additions
and
14 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,3 +1,6 @@ | ||
*.pyc | ||
__pycache__ | ||
*.egg | ||
*.egg-info | ||
|
||
venv |
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,10 +1,11 @@ | ||
FROM python:3.9-alpine3.15 | ||
|
||
# caching of dependencies | ||
COPY requirements.txt /app/ | ||
RUN pip install -r /app/requirements.txt | ||
|
||
COPY assets /app/assets | ||
COPY templates /app/templates | ||
COPY rickroller.py server.py /app/ | ||
COPY setup.py /app/ | ||
COPY rickroll /app/rickroll | ||
RUN pip install -e /app | ||
|
||
ENTRYPOINT ["python", "/app/server.py"] | ||
ENTRYPOINT ["python", "-m", "rickroll"] |
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,9 @@ | ||
import argparse | ||
from . import app | ||
|
||
if __name__ == '__main__': | ||
parser = argparse.ArgumentParser() | ||
parser.add_argument('-d', '--debug', action='store_true') | ||
args = parser.parse_args() | ||
|
||
app.run(host='0.0.0.0', port=8080, debug=args.debug) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,13 @@ | ||
from setuptools import setup, find_packages | ||
import os, sys | ||
|
||
HERE = os.path.dirname(os.path.realpath(__file__)) | ||
with open(os.path.join(HERE, 'requirements.txt')) as f: | ||
requirements = [line.strip() for line in f if len(line.strip()) and not line.strip().startswith('#')] | ||
|
||
setup( | ||
name='rickroll', | ||
packages=find_packages(), | ||
include_package_data=True, | ||
install_requires=requirements, | ||
) |