-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
50 lines (47 loc) · 1.11 KB
/
docker-compose.yml
File metadata and controls
50 lines (47 loc) · 1.11 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
services:
lint:
image: node:24.13.0-alpine3.23
volumes:
- .:/app
working_dir: /app
entrypoint: |-
sh -ceuo pipefail '
apk add shadow
usermod -u $HOST_UID node
su node -c "$$@"'
command: sh -c 'npm i --no-save eslint && ./node_modules/.bin/eslint --color .'
test: &test
image: node:16.20.2-alpine3.18
depends_on:
test-db:
condition: service_healthy
volumes:
- .:/app
working_dir: /app
entrypoint: |-
sh -ceuo pipefail '
apk add shadow
usermod -u $HOST_UID node
su node -c "$$@"'
command: sh -c 'npm i && npm test'
watch:
<<: *test
command: sh -c 'npm i && npm run watch'
test-db:
image: mysql:9.5.0
stop_signal: SIGKILL
logging:
options:
max-size: 10k # Keep down the noise
ulimits:
nofile:
soft: 1024
hard: 1024
environment:
MYSQL_DATABASE: test
MYSQL_ALLOW_EMPTY_PASSWORD: yes
healthcheck:
test: '/usr/bin/mysql -D test -u root --execute "SELECT 1"'
interval: 1s
timeout: 1s
retries: 20