forked from nocobase/nocobase
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitpod.yml
More file actions
71 lines (65 loc) · 1.69 KB
/
.gitpod.yml
File metadata and controls
71 lines (65 loc) · 1.69 KB
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
env:
DB_DIALECT: "mysql"
DB_HOST: "localhost"
DB_PORT: "5432"
DB_DATABASE: "nocobase"
DB_USER: "nocobase"
DB_PASSWORD: "nocobase"
APP_PORT: "13000"
DB_CONTAINER_NAME: "nocobase-db"
tasks:
- name: Start MySQL
before: |
container_id=$(docker ps --all --quiet --filter "name=${DB_CONTAINER_NAME}")
if [ -z "${container_id}" ]; then
docker create --name ${DB_CONTAINER_NAME} -p "${DB_PORT}:3306" \
-e MYSQL_ROOT_PASSWORD="${DB_PASSWORD}" \
-e MYSQL_DATABASE="${DB_DATABASE}" \
-e MYSQL_USER="${DB_USER}" \
-e MYSQL_PASSWORD="${DB_PASSWORD}" \
mysql:8 \
--character-set-server=utf8mb4 \
--collation-server=utf8mb4_unicode_ci
fi
docker start "${DB_CONTAINER_NAME}"
command: |
echo "Database started"
gp sync-done db-ready
exit 0
- name: Setup Environment
init: |
cat > .env << EOL
DB_DIALECT=mysql
DB_HOST=${DB_HOST}
DB_PORT=${DB_PORT}
DB_DATABASE=${DB_DATABASE}
DB_USER=${DB_USER}
DB_PASSWORD=${DB_PASSWORD}
NOCOBASE_PKG_USERNAME=
NOCOBASE_PKG_PASSWORD=
EOL
command: |
echo "Environment configured"
gp sync-done env-ready
exit 0
- name: Install Dependencies
init: |
yarn install
yarn nocobase install
command: |
echo "Dependencies installed"
gp sync-done deps-ready
exit 0
- name: Start Application
command: |
gp sync-await db-ready
gp sync-await env-ready
gp sync-await deps-ready
yarn dev
ports:
- port: 5432
onOpen: ignore
visibility: private
- port: 13000
onOpen: open-preview
visibility: public