mirror of
https://github.com/krateng/maloja.git
synced 2025-04-12 07:00:02 +03:00
Simpler dev testing with compose
This commit is contained in:
parent
f8b10ab68c
commit
273713cdc4
13
dev/docker-compose.yml
Normal file
13
dev/docker-compose.yml
Normal file
@ -0,0 +1,13 @@
|
||||
services:
|
||||
maloja:
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: ./Containerfile
|
||||
ports:
|
||||
- "42010:42010"
|
||||
volumes:
|
||||
- "./testdata:/data"
|
||||
environment:
|
||||
- "MALOJA_DATA_DIRECTORY=/data"
|
||||
- "PUID=1000"
|
||||
- "PGID=1000"
|
@ -1,21 +0,0 @@
|
||||
import toml
|
||||
import os
|
||||
|
||||
with open("pyproject.toml") as filed:
|
||||
data = toml.load(filed)
|
||||
|
||||
info = {
|
||||
'name':data['project']['name'],
|
||||
'license':"GPLv3",
|
||||
'version':data['project']['version'],
|
||||
'architecture':'all',
|
||||
'description':'"' + data['project']['description'] + '"',
|
||||
'url':'"' + data['project']['urls']['homepage'] + '"',
|
||||
'maintainer':f"\"{data['project']['authors'][0]['name']} <{data['project']['authors'][0]['email']}>\"",
|
||||
}
|
||||
|
||||
|
||||
for target in ["apk","deb"]:
|
||||
lcmd = f"fpm {' '.join(f'--{key} {info[key]}' for key in info)} -s python -t {target} . "
|
||||
print(lcmd)
|
||||
os.system(lcmd)
|
@ -1,2 +0,0 @@
|
||||
docker build -t maloja . -f Containerfile
|
||||
docker run --rm -p 42010:42010 -v $PWD/testdata:/mlj -e MALOJA_DATA_DIRECTORY=/mlj maloja
|
@ -1,2 +0,0 @@
|
||||
podman build -t maloja . -f Containerfile
|
||||
podman run --rm -p 42010:42010 -v $PWD/testdata:/mlj -e MALOJA_DATA_DIRECTORY=/mlj maloja
|
Loading…
x
Reference in New Issue
Block a user