-
Notifications
You must be signed in to change notification settings - Fork 0
/
nixpacks.django.toml
66 lines (55 loc) · 1.16 KB
/
nixpacks.django.toml
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
[variables]
NIXPACKS_METADATA = 'python'
PYTHONUNBUFFERED = '1'
[phases.setup]
name = 'setup'
nixPkgs = [
'python39',
'postgresql',
'gcc',
'nodejs-16_x',
'npm-8_x',
'gettext'
]
nixLibs = [
'zlib',
'stdenv.cc.cc.lib',
]
nixOverlays = ['https://github.com/railwayapp/nix-npm-overlay/archive/main.tar.gz']
[phases.install]
name = 'install'
dependsOn = ['setup']
cmds = [
'python -m venv /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt',
]
cacheDirectories = ['/root/.cache/pip']
paths = ['/opt/venv/bin']
[phases.install-front]
cmds = [
'npm ci',
'npm run tailwind:install'
]
dependsOn = ['install']
cacheDirectories = ['/root/.npm']
paths = ['/app/node_modules/.bin']
[phases.build]
name = 'build'
dependsOn = ['install-front']
cmds = [
'npm run build',
'npm run tailwind:build'
]
cacheDirectories = ['node_modules/.cache']
[phases.release]
name = 'release'
dependsOn = [
'build',
]
cmds = [
'python manage.py migrate',
'python manage.py train',
'python manage.py collectstatic --noinput',
'python manage.py compilemessages -l es',
]
[start]
cmd = 'gunicorn config.wsgi:application'