-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.gitpod.yml
33 lines (31 loc) · 1.18 KB
/
.gitpod.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
tasks:
- name: Setup and startup
init: |
cp -n env/django.env.default env/django.env
printf "\n" >> env/django.env
echo DJANGO_CSRF_TRUSTED_ORIGINS="$(echo \"${GITPOD_WORKSPACE_URL}\" | sed 's|https://|https://8000-|g')" >> env/django.env
printf "\nDJANGO_PRODUCTION=0\nDJANGO_ALLOWED_HOSTS=.gitpod.io" >> env/django.env
cp -n env/postgres.env.default env/postgres.env
cp -n env/metabase.env.default env/metabase.env
command: docker compose --profile metabase -f docker-compose.yml -f docker-compose.dev.yml up -d
- name: Populate database
init: |
gp ports await 8000
source env/metabase.env
docker compose exec tmd-pg psql --user $MB_DB_USER -c "CREATE DATABASE ${MB_DB_DBNAME}"
docker compose exec tmd-dj python manage.py load_data
ports:
- name: Django
description: the port used by the Django container
port: 8000
onOpen: open-preview
visibility: public
- name: Postgres
description: the port used by the Postgres container
port: 5432
onOpen: ignore
- name: Metabase
description: the port used by the Metabase container
port: 3000
onOpen: open-preview
visibility: public