-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
43 lines (42 loc) · 1.32 KB
/
docker-compose.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
services:
ssr-web:
image: node:alpine
env_file: .env.docker
healthcheck:
test: ["CMD-SHELL", "wget --quiet --spider --tries=1 http://localhost:3001/docker/home || exit 1"]
interval: 10s
timeout: 2s
retries: 3
start_period: 15s
container_name: ssr-web
volumes:
- ./app/src/:/work/app/src
- ./app/package.json:/work/app/package.json
- ./auth/src/:/work/auth/src
- ./auth/package.json:/work/auth/package.json
- ./assets:/work/assets
- ./package.json:/work/package.json
- ./tsconfig.json:/work/tsconfig.json
- ./webpack.config.cjs:/work/webpack.config.cjs
working_dir: /work
command: ["/bin/sh", "-c", "npm run install-deps && npm run build && npm run start:dev"]
ports:
- 3001:3001
ssr-test:
depends_on:
ssr-web:
condition: service_healthy
image: mcr.microsoft.com/playwright:v1.46.1-jammy
env_file: .env.docker
container_name: ssr-test
volumes:
- ./tests:/app/tests
- ./playwright.config.ts:/app/playwright.config.ts
- ./src/:/app/watch/src
- ./tests/:/app/watch/tests
working_dir: /app
command: >
/bin/sh -c "
npm i @playwright/test &&
npx playwright install-deps &&
npx nodemon --watch /app/watch --ext ts,tsx,html --exec 'npx playwright test'"