forked from openlibhums/janeway
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.lando.yml
70 lines (67 loc) · 2.13 KB
/
.lando.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
---
name: janeway
# CAREFUL with this env file, Docker env files don't support interpolation!
env_file:
- dockerfiles/lando_defaults.env
- dockerfiles/lando_local.env
services:
appserver:
type: python:3.9
command: python /app/src/manage.py runserver 0.0.0.0:8000 -v 3
build_as_root:
- grep '^deb ' /etc/apt/sources.list | perl -pe 's/deb /deb-src /' >> /etc/apt/sources.list
- apt-get update -qq && apt-get install -y python3-lxml pylint libxml2-dev libxslt1-dev python3-dev zlib1g-dev lib32z1-dev libffi-dev libssl-dev libjpeg-dev && apt-get build-dep -y lxml
build:
- cd /app && pip install --upgrade pip && pip install Cython && pip install psycopg2-binary~=2.8.0 && pip install -r requirements.txt && pip install -r dev-requirements.txt
scanner: true
overrides:
ports:
- '8000:8000'
environment:
PYTHONPATH: "/app/src"
JANEWAY_SETTINGS_MODULE: "core.settings" # this is the path to the Janeway settings file, which is in src/core/settings.py
moreHttpPorts:
- '8000'
db:
type: postgres:15
portforward: true
creds:
user: postgres
password:
database: janeway
tooling:
python:
service: appserver
cmd: python
dir: /app/src
pip:
service: appserver
description: run pip commands to manage Python package installation in this environment
cmd: pip
dir: /app/src
manage:
service: appserver
cmd: python manage.py
dir: /app/src
restart-runserver:
service: appserver
description: Quickly restarts the Django runserver process, follows logs, and enables interactive debugging
cmd: killall python || python /app/src/manage.py runserver 0.0.0.0:8000 -v 3
dir: /app/src
user: root
psql:
service: db
cmd: psql -U postgres
'db-import <file>':
service: :host
description: Imports a dump file into a database service
cmd: /helpers/sql-import.sh
options:
host:
description: The database service to use
default: db
alias:
- h
no-wipe:
description: Do not destroy the existing database before an import
boolean: true