-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitpod.yml
112 lines (107 loc) · 4.05 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
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
image:
file: .gitpod.Dockerfile
additionalRepositories:
- url: https://gitlab.askanna.io/askanna/askanna-frontend/
- url: https://gitlab.askanna.io/askanna/askanna-cli/
- url: https://gitlab.askanna.io/askanna/askanna-docs/
workspaceLocation: askanna-backend/.gitpod.askanna.code-workspace
tasks:
- name: Docker Backend
init: |
cp .env.django.example .env.django
cp .env.postgres.example .env.postgres
command: |
sed -i "s~ASKANNA_API_URL.*~ASKANNA_API_URL=$(gp url 8000)~g" .env.django
sed -i "s~ASKANNA_CDN_URL.*~ASKANNA_CDN_URL=$(gp url 8000)~g" .env.django
sed -i "s~ASKANNA_UI_URL.*~ASKANNA_UI_URL=$(gp url 4173)~g" .env.django
docker compose up --detach --build
while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:8000/ht/)" != "200" ]]; do sleep 5; done
docker compose exec -e DJANGO_SUPERUSER_PASSWORD=DevAskAnna django python manage.py createsuperuser --username [email protected] --email [email protected] --noinput
docker compose logs --follow django
- name: Vite Frontend Preview
before: |
cd ../askanna-frontend
init: |
cp .env.development .env.production.local
command: |
sed -i "s~VITE_APP_URL=.*~VITE_APP_URL=$(gp url 4173)~g" .env.production.local
sed -i "s~VITE_APP_API_URL=.*~VITE_APP_API_URL=$(gp url 8000)~g" .env.production.local
npm install
npm run build
npm run preview
- name: MkDocs Documentation
before: |
cd ../askanna-docs
init: |
git lfs install && git lfs pull
python -m venv .venv
command: |
source .venv/bin/activate
pip install -r requirements-dev.txt
mkdocs serve --dev-addr "127.0.0.1:8080"
- name: Frontend
command: |
cd ../askanna-frontend
- name: Documentation
command: |
cd ../askanna-docs
source .venv/bin/activate
pre-commit install --install-hooks
- name: CLI & SDK
before: |
cd ../askanna-cli
init: |
python -m venv .venv
command: |
source .venv/bin/activate
make install-dev
pre-commit install --install-hooks
while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:8000/ht/)" != "200" ]]; do echo "Backend is not ready yet..." && sleep 10; done && echo "Backend is ready!"
while ! command -v askanna > /dev/null; do echo "CLI & SDK is not ready yet..." && sleep 10; done && echo "CLI & SDK is ready!" && askanna login --remote $(gp url 8000) --email [email protected] --password DevAskAnna
- name: Backend
init: |
python -m venv .venv
command: |
source .venv/bin/activate
pip install -r requirements/local.txt
pre-commit install --install-hooks
while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:4173/ht/)" != "200" ]]; do echo "Frontend is not ready yet..." && sleep 10; done && echo "Frontend is ready!"
while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:8000/ht/)" != "200" ]]; do echo "Backend is not ready yet..." && sleep 10; done && echo "Backend is ready!"
ports:
- name: Backend Dev
description: The AskAnna Backend application in development mode
port: 8000
visibility: public
- name: Backend Flower
description: Flower for monitoring Celery
port: 5555
visibility: private
- name: Frontend Dev
description: The AskAnna Frontend application in development mode
port: 5173
visibility: private
- name: Frontend Preview
description: The AskAnna Frontend application in review mode
port: 4173
visibility: private
- name: Documentation
description: The AskAnna documentation
port: 8080
visibility: private
vscode:
extensions:
- EditorConfig.EditorConfig
- eamodio.gitlens
- GitLab.gitlab-workflow
- ms-python.python
- charliermarsh.ruff
- njpwerner.autodocstring
- batisteo.vscode-django
- DavidAnson.vscode-markdownlint
- yzhang.markdown-all-in-one
- TakumiI.markdowntable
- ms-azuretools.vscode-docker
- jeff-hykin.better-dockerfile-syntax
- timonwong.shellcheck
- ZainChen.json
- octref.vetur