-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose-tasks-fe.yml
77 lines (76 loc) · 2.4 KB
/
docker-compose-tasks-fe.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
include:
- docker-compose.yml
services:
npm:
build: ./docker/npm
image: example_tasks_npm
cap_drop: [all]
working_dir: /var/www/src
entrypoint: npm
command: ci --loglevel http --omit=optional
volumes: [./tasks_fe/:/var/www]
npm_tests:
build: ./docker/npm
image: example_tasks_npm
cap_drop: [all]
working_dir: /var/www/tests
entrypoint: npm
command: ci --ignore-scripts --loglevel notice
volumes: [./tasks_fe/:/var/www]
biome:
build: ./docker/npm
image: example_tasks_npm
cap_drop: [all]
working_dir: /var/www
entrypoint: tests/node_modules/.bin/biome check .
volumes: [./tasks_fe:/var/www:ro]
network_mode: none
stylelint:
build: ./docker/npm
image: example_tasks_npm
cap_drop: [all]
working_dir: /var/www
entrypoint: tests/node_modules/.bin/stylelint 'src/**/*.css' --config-basedir ./tests
volumes: [./tasks_fe:/var/www:ro]
network_mode: none
tsclint:
build: ./docker/npm
image: example_tasks_npm
cap_drop: [all]
working_dir: /var/www
entrypoint: tests/node_modules/.bin/tsc
volumes: [./tasks_fe:/var/www:ro]
network_mode: none
htmlvalidate:
build: ./docker/npm
image: example_tasks_npm
cap_drop: [all]
working_dir: /var/www
entrypoint: tests/node_modules/.bin/html-validate ./src/
volumes: [./tasks_fe:/var/www:ro]
network_mode: none
esbuild:
build: ./docker/npm
image: example_tasks_npm
cap_drop: [all]
working_dir: /var/www
entrypoint: sh -c "
rm -rf dist/* \
&& tests/node_modules/.bin/esbuild --bundle src/*.js src/*.css src/images/*.* --loader:.jpg=copy --analyze \
--platform=browser --target=es2020 --minify --legal-comments=none --format=esm --outdir=dist/ \
--define:globalThis.PROD=true \
&& tests/node_modules/.bin/html-minifier-terser --collapse-whitespace --preserve-line-breaks --remove-comments \
--input-dir ./src/ --output-dir ./dist/ --file-ext html \
&& ./dist_hash.sh \
&& gzip -k -f -9 dist/*.js dist/*.css dist/*.html \
&& stat -c '%n %s' src/*.html dist/*.gz dist/images/*"
volumes: [./tasks_fe:/var/www]
network_mode: none
vitest:
build: ./docker/npm
image: example_tasks_npm
cap_drop: [all]
working_dir: /var/www/tests
entrypoint: timeout -s kill 20 node_modules/.bin/vitest run
volumes: [./tasks_fe/:/var/www]
network_mode: none