This commit is contained in:
parent
0d6e0e4c19
commit
2498b8e18a
30
.drone.yml
30
.drone.yml
@ -0,0 +1,30 @@
|
|||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: default
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: check
|
||||||
|
image: python:3.11.5-alpine
|
||||||
|
commands:
|
||||||
|
- apk add --no-cache poetry
|
||||||
|
- pip install --no-cache-dir poethepoet
|
||||||
|
- poetry install --sync
|
||||||
|
#- poe lint
|
||||||
|
|
||||||
|
- name: build
|
||||||
|
image: docker/compose:alpine-1.29.2
|
||||||
|
privileged: true
|
||||||
|
volumes:
|
||||||
|
- name: docker-socket
|
||||||
|
path: /var/run/docker.sock
|
||||||
|
commands:
|
||||||
|
- docker-compose build
|
||||||
|
- docker-compose up -d
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- main
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: docker-socket
|
||||||
|
host:
|
||||||
|
path: /var/run/docker.sock
|
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -1 +1 @@
|
|||||||
Pipfile.lock merge=binary
|
poetry.lock merge=binary
|
||||||
|
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@ -1,6 +1,4 @@
|
|||||||
{
|
{
|
||||||
"editor.formatOnSave": true,
|
|
||||||
"python.defaultInterpreterPath": ".venv/bin/python",
|
"python.defaultInterpreterPath": ".venv/bin/python",
|
||||||
"python.formatting.provider": "black",
|
|
||||||
"python.terminal.activateEnvironment": false
|
"python.terminal.activateEnvironment": false
|
||||||
}
|
}
|
||||||
|
13
Dockerfile
13
Dockerfile
@ -0,0 +1,13 @@
|
|||||||
|
FROM python:3.11.5-alpine
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
RUN apk add --no-cache poetry
|
||||||
|
|
||||||
|
COPY ./poetry.lock ./pyproject.toml ./
|
||||||
|
|
||||||
|
RUN poetry install --without dev --sync
|
||||||
|
|
||||||
|
COPY ./dj-embe ./dj-embe
|
||||||
|
|
||||||
|
CMD poetry run python dj-embe
|
29
Pipfile
29
Pipfile
@ -1,29 +0,0 @@
|
|||||||
[[source]]
|
|
||||||
url = "https://pypi.org/simple"
|
|
||||||
verify_ssl = true
|
|
||||||
name = "pypi"
|
|
||||||
|
|
||||||
[scripts]
|
|
||||||
lint = "bash -c 'isort dj-embe && black dj-embe && flake8 dj-embe && mypy dj-embe'"
|
|
||||||
|
|
||||||
[packages]
|
|
||||||
py-cord = "*"
|
|
||||||
pynacl = "*"
|
|
||||||
redis = "*"
|
|
||||||
spotipy = "*"
|
|
||||||
toml = "*"
|
|
||||||
youtube-search-python = "*"
|
|
||||||
yt-dlp = "*"
|
|
||||||
|
|
||||||
[dev-packages]
|
|
||||||
black = "*"
|
|
||||||
flake8 = "*"
|
|
||||||
flake8-pyproject = "*"
|
|
||||||
isort = "*"
|
|
||||||
mypy = "*"
|
|
||||||
types-redis = "*"
|
|
||||||
types-requests = "*"
|
|
||||||
types-toml = "*"
|
|
||||||
|
|
||||||
[requires]
|
|
||||||
python_version = ">=3.10"
|
|
1204
Pipfile.lock
generated
1204
Pipfile.lock
generated
File diff suppressed because it is too large
Load Diff
@ -5,4 +5,4 @@ services:
|
|||||||
image: redis:alpine
|
image: redis:alpine
|
||||||
command: /bin/sh -c "redis-server --requirepass dev"
|
command: /bin/sh -c "redis-server --requirepass dev"
|
||||||
ports:
|
ports:
|
||||||
- 6379:6379
|
- 127.0.0.1:6379:6379
|
||||||
|
12
docker-compose.yml
Normal file
12
docker-compose.yml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
version: "3.9"
|
||||||
|
|
||||||
|
services:
|
||||||
|
dj-embe:
|
||||||
|
container_name: dj-embe
|
||||||
|
networks:
|
||||||
|
- apps
|
||||||
|
build: ./
|
||||||
|
|
||||||
|
networks:
|
||||||
|
apps:
|
||||||
|
name: apps
|
1481
poetry.lock
generated
Normal file
1481
poetry.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
3
poetry.toml
Normal file
3
poetry.toml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[virtualenvs]
|
||||||
|
create = true
|
||||||
|
in-project = true
|
@ -1,3 +1,34 @@
|
|||||||
|
[tool.poetry]
|
||||||
|
name = "dj-embe"
|
||||||
|
version = "0.1.0"
|
||||||
|
description = ""
|
||||||
|
authors = ["Yanis Rigaudeau"]
|
||||||
|
readme = "README.md"
|
||||||
|
|
||||||
|
[tool.poetry.dependencies]
|
||||||
|
python = "^3.11"
|
||||||
|
py-cord = "^2.4.1"
|
||||||
|
pynacl = "^1.5.0"
|
||||||
|
redis = "^5.0.0"
|
||||||
|
spotipy = "^2.23.0"
|
||||||
|
toml = "^0.10.2"
|
||||||
|
youtube-search-python = "^1.6.6"
|
||||||
|
yt-dlp = "^2023.7.6"
|
||||||
|
|
||||||
|
[tool.poetry.group.dev.dependencies]
|
||||||
|
black = "^23.9.1"
|
||||||
|
flake8 = "^6.1.0"
|
||||||
|
flake8-pyproject = "^1.2.3"
|
||||||
|
isort = "^5.12.0"
|
||||||
|
mypy = "^1.5.1"
|
||||||
|
types-redis = "^4.6.0.6"
|
||||||
|
types-requests = "^2.31.0.2"
|
||||||
|
types-toml = "^0.10.8.7"
|
||||||
|
|
||||||
|
[build-system]
|
||||||
|
requires = ["poetry-core"]
|
||||||
|
build-backend = "poetry.core.masonry.api"
|
||||||
|
|
||||||
[tool.flake8]
|
[tool.flake8]
|
||||||
exclude = [".git", "__pycache__"]
|
exclude = [".git", "__pycache__"]
|
||||||
ignore = ["E501", "E731", "W503"]
|
ignore = ["E501", "E731", "W503"]
|
||||||
@ -8,3 +39,6 @@ profile = "black"
|
|||||||
|
|
||||||
[tool.mypy]
|
[tool.mypy]
|
||||||
ignore_missing_imports = "true"
|
ignore_missing_imports = "true"
|
||||||
|
|
||||||
|
[tool.poe.tasks]
|
||||||
|
lint = "sh -c 'isort dj-embe && black dj-embe && flake8 dj-embe && mypy dj-embe'"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user