-
-
Notifications
You must be signed in to change notification settings - Fork 60
/
Copy pathnixpacks.toml
22 lines (18 loc) · 1.25 KB
/
nixpacks.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# https://nixpacks.com/docs/configuration/file
providers = ['python', 'node'] # force python as the only provider, otherwise railway may think this is a node project
# set up some variables to minimize annoyance
[variables]
LITESTAR_SKIP_NODEENV_INSTALL = 'true' # skip using nodeenv. nix handles that for us.
NIXPACKS_UV_VERSION = '0.5.11' # set uv version to install
NIXPACKS_PYTHON_VERSION = '3.12' # set python version to install
NPM_CONFIG_FUND = 'false' # the fund notification is is also pretty useless in a production environment
NPM_CONFIG_UPDATE_NOTIFIER = 'false' # the node update notification is relatively useless in a production environment
PIP_DISABLE_PIP_VERSION_CHECK = '1' # the pip update notification is relatively useless in a production environment
[phases.setup]
nixPkgs = ['...'] # add nodejs since it is needed to build the frontend
[phases.install]
# cmds = [
# 'python -m venv --copies /opt/venv && . /opt/venv/bin/activate && pip install -U mypy cython setuptools uv==$NIXPACKS_UV_VERSION && uv sync --frozen --no-dev',
# ] # custom install command allows for setting uv version above
[start]
cmd = '/opt/venv/bin/app database upgrade --no-prompt && /opt/venv/bin/app run --wc 2 --host 0.0.0.0 --port $PORT'