Skip to content

Commit 4fcb4f2

Browse files
committed
Initial commit
0 parents  commit 4fcb4f2

13 files changed

+896
-0
lines changed

.drone.yml

Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
kind: pipeline
2+
type: docker
3+
name: amd64
4+
5+
platform:
6+
arch: amd64
7+
8+
steps:
9+
- name: build and publish
10+
image: plugins/docker
11+
settings:
12+
registry: registry.dev.onetask.ai
13+
username:
14+
from_secret: docker_username
15+
password:
16+
from_secret: docker_password
17+
repo: "registry.dev.onetask.ai/${DRONE_REPO}"
18+
tags: ["${DRONE_COMMIT_SHA}", "${DRONE_COMMIT_BRANCH}"]
19+
cache_from:
20+
- "registry.dev.onetask.ai/${DRONE_REPO}:main"
21+
- "registry.dev.onetask.ai/${DRONE_REPO}:${DRONE_COMMIT_BRANCH}"
22+
- name: trigger update
23+
image: appleboy/drone-ssh
24+
settings:
25+
host: app.dev.onetask.ai
26+
username:
27+
from_secret: ssh_user
28+
key:
29+
from_secret: ssh_key
30+
ssh_passphrase:
31+
from_secret: ssh_passphrase
32+
script:
33+
- /bin/sh ./trigger_dev_deployment.sh
34+
35+
trigger:
36+
event:
37+
- push
38+
39+
---
40+
kind: pipeline
41+
type: docker
42+
name: arm64
43+
44+
platform:
45+
arch: arm64
46+
47+
steps:
48+
- name: build and publish
49+
image: plugins/docker
50+
settings:
51+
registry: registry.dev.onetask.ai
52+
username:
53+
from_secret: docker_username
54+
password:
55+
from_secret: docker_password
56+
repo: "registry.dev.onetask.ai/${DRONE_REPO}"
57+
tags: ["${DRONE_COMMIT_SHA}_arm64", "${DRONE_COMMIT_BRANCH}_arm64"]
58+
cache_from:
59+
- "registry.dev.onetask.ai/${DRONE_REPO}:main_arm64"
60+
- "registry.dev.onetask.ai/${DRONE_REPO}:${DRONE_COMMIT_BRANCH}_arm64"
61+
62+
trigger:
63+
branch:
64+
- dev
65+
- release
66+
event:
67+
- push
68+
69+
---
70+
kind: pipeline
71+
type: docker
72+
name: amd64-dockerhub
73+
74+
platform:
75+
arch: amd64
76+
77+
steps:
78+
- name: build and publish
79+
image: plugins/docker
80+
settings:
81+
username:
82+
from_secret: dockerhub_username
83+
password:
84+
from_secret: dockerhub_password
85+
repo: "kernai/${DRONE_REPO_NAME}"
86+
tag: "${DRONE_TAG}-drone-amd64"
87+
88+
trigger:
89+
event:
90+
- tag
91+
92+
---
93+
kind: pipeline
94+
type: docker
95+
name: arm64-dockerhub
96+
97+
platform:
98+
arch: arm64
99+
100+
steps:
101+
- name: build and publish
102+
image: plugins/docker
103+
settings:
104+
username:
105+
from_secret: dockerhub_username
106+
password:
107+
from_secret: dockerhub_password
108+
repo: "kernai/${DRONE_REPO_NAME}"
109+
tag: "${DRONE_TAG}-drone-arm64"
110+
111+
trigger:
112+
event:
113+
- tag
114+
115+
---
116+
kind: pipeline
117+
name: manifest-version
118+
steps:
119+
- name: manifest
120+
image: plugins/manifest
121+
settings:
122+
spec: drone-manifest-version.tmpl
123+
tag: "${DRONE_TAG}"
124+
ignore_missing: true
125+
username:
126+
from_secret: dockerhub_username
127+
password:
128+
from_secret: dockerhub_password
129+
130+
depends_on:
131+
- amd64-dockerhub
132+
- arm64-dockerhub
133+
134+
trigger:
135+
event:
136+
- tag
137+
138+
---
139+
kind: pipeline
140+
name: manifest-latest
141+
steps:
142+
- name: manifest
143+
image: plugins/manifest
144+
settings:
145+
spec: drone-manifest-latest.tmpl
146+
tag: "${DRONE_TAG}"
147+
ignore_missing: true
148+
username:
149+
from_secret: dockerhub_username
150+
password:
151+
from_secret: dockerhub_password
152+
153+
depends_on:
154+
- manifest-version
155+
156+
trigger:
157+
event:
158+
- tag

.gitignore

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
*.ipynb
2+
.vscode/
3+
.DS_Store
4+
5+
# PyCharm
6+
.idea/
7+
8+
# Byte-compiled / optimized / DLL files
9+
__pycache__/
10+
*.py[cod]
11+
*$py.class
12+
13+
# C extensions
14+
*.so
15+
16+
# Distribution / packaging
17+
.Python
18+
build/
19+
develop-eggs/
20+
dist/
21+
downloads/
22+
eggs/
23+
.eggs/
24+
lib/
25+
lib64/
26+
parts/
27+
sdist/
28+
var/
29+
wheels/
30+
pip-wheel-metadata/
31+
share/python-wheels/
32+
*.egg-info/
33+
.installed.cfg
34+
*.egg
35+
MANIFEST
36+
37+
# PyInstaller
38+
# Usually these files are written by a python script from a template
39+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
40+
*.manifest
41+
*.spec
42+
43+
# Installer logs
44+
pip-log.txt
45+
pip-delete-this-directory.txt
46+
47+
# Unit test / coverage reports
48+
htmlcov/
49+
.tox/
50+
.nox/
51+
.coverage
52+
.coverage.*
53+
.cache
54+
nosetests.xml
55+
coverage.xml
56+
*.cover
57+
*.py,cover
58+
.hypothesis/
59+
.pytest_cache/
60+
61+
# Translations
62+
*.mo
63+
*.pot
64+
65+
# Django stuff:
66+
*.log
67+
local_settings.py
68+
db.sqlite3
69+
db.sqlite3-journal
70+
71+
# Flask stuff:
72+
instance/
73+
.webassets-cache
74+
75+
# Scrapy stuff:
76+
.scrapy
77+
78+
# Sphinx documentation
79+
docs/_build/
80+
81+
# PyBuilder
82+
target/
83+
84+
# Jupyter Notebook
85+
.ipynb_checkpoints
86+
87+
# IPython
88+
profile_default/
89+
ipython_config.py
90+
91+
# pyenv
92+
.python-version
93+
94+
# pipenv
95+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
96+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
97+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
98+
# install all needed dependencies.
99+
#Pipfile.lock
100+
101+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
102+
__pypackages__/
103+
104+
# Celery stuff
105+
celerybeat-schedule
106+
celerybeat.pid
107+
108+
# SageMath parsed files
109+
*.sage.py
110+
111+
# Environments
112+
.env
113+
.venv
114+
env/
115+
venv/
116+
ENV/
117+
env.bak/
118+
venv.bak/
119+
120+
# Spyder project settings
121+
.spyderproject
122+
.spyproject
123+
124+
# Rope project settings
125+
.ropeproject
126+
127+
# mkdocs documentation
128+
/site
129+
130+
# mypy
131+
.mypy_cache/
132+
.dmypy.json
133+
dmypy.json
134+
135+
# Pyre type checker
136+
.pyre/

Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM python:3.9
2+
3+
RUN apt update && apt install -y curl
4+
5+
COPY . .
6+
7+
RUN pip3 install -r requirements.txt
8+
9+
ENTRYPOINT ["/run.sh"]

0 commit comments

Comments
 (0)