2019-03-05 02:01:47 +01:00
deployments :
default :
2022-07-15 16:36:03 +02:00
dockerimage : python:3.10.5-slim-buster
2019-03-05 02:01:47 +01:00
build_steps :
2019-03-20 18:26:01 +01:00
- apt-get update && apt-get install -y libssl-dev libpq-dev git build-essential libfontconfig1 libfontconfig1-dev curl
2022-01-31 15:51:38 +01:00
- RUN bash -c "curl -sL https://deb.nodesource.com/setup_16.x | bash -"
2019-03-20 18:26:01 +01:00
- apt install -y nodejs
2019-03-21 23:24:04 +01:00
- pip install setuptools pip --upgrade --force-reinstall
2019-03-20 18:26:01 +01:00
- cd /code
2021-09-17 18:22:44 +02:00
post_build_steps :
2022-07-15 16:36:03 +02:00
- npm ci --audit=false --progress=false
2021-12-23 05:21:23 +01:00
- npm run build
2019-03-20 18:26:01 +01:00
- pip install /code
2019-03-05 02:01:47 +01:00
- mkdir /myproject
- cd /myproject
- wagtail start mysite
- cd /myproject/mysite
- python manage.py migrate
2020-01-24 16:23:58 +01:00
- echo "<br><h1>Wagtail test instance</h1><p>Log into <a href='/admin/'>/admin/</a> with 'admin' / 'changeme'.</p>" > home/templates/home/welcome_page.html
2021-09-17 18:22:44 +02:00
- echo "from django.contrib.auth import get_user_model; User = get_user_model(); User.objects.create_superuser('admin', 'admin@example.com', 'changeme')" | python manage.py shell
2022-07-15 16:36:03 +02:00
- echo "CSRF_TRUSTED_ORIGINS = ['https://*.squash.io']" >> mysite/settings/dev.py
2019-03-05 02:01:47 +01:00
launch_steps :
2019-03-21 23:24:04 +01:00
- cd /myproject/mysite
- python manage.py runserver 0.0.0.0:80
2021-09-17 18:22:44 +02:00
port_forwarding : 80 : 80
2019-03-21 23:24:04 +01:00
run_options : -v ~/code:/code