-
Notifications
You must be signed in to change notification settings - Fork 0
/
werf.yaml
44 lines (42 loc) · 1.08 KB
/
werf.yaml
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
configVersion: 1
project: "web-client"
---
image: builder
from: node:18-alpine
git:
- add: /
to: /app
stageDependencies:
install:
- package.json
- yarn.lock
setup:
- "**/*"
shell:
beforeInstall:
- apk --no-cache --update --virtual build-dependencies add python3 make g++ git
install:
- cd /app
#- yarn autoclean --init
#- yarn autoclean --force
- yarn install
setup:
- cd /app
- export VITE_SENTRY_AUTH_TOKEN="{{ env "VITE_SENTRY_AUTH_TOKEN" }}"
- export VITE_SENTRY_DSN="{{ env "VITE_SENTRY_DSN" }}"
- export VITE_APP_DOMAIN="{{ env "VITE_APP_DOMAIN" }}"
- yarn build
#- sh -c '[ -d /app/dist/files ] && echo "$FILE exist." || mkdir -p /app/dist/files'
#- sh -c '[ -d /app/files ] && echo "$FILE exist." || mkdir -p /app/files'
#- sh -c '[ -z "`ls /app/files`" ] && echo "Empty" || cp -r /app/files/* /app/dist/files'
---
image: web
from: nginx:alpine
git:
- add: /nginx.conf
to: /etc/nginx/nginx.conf
import:
- image: builder
add: /app/dist
to: /usr/share/nginx/html
after: setup