-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathdocker-compose.yml
86 lines (79 loc) · 1.91 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
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
78
79
80
81
82
83
84
85
86
services:
activitypub:
build: .
volumes:
- ./src:/opt/activitypub/src
environment:
- PORT=8080
- MYSQL_USER=ghost
- MYSQL_PASSWORD=password
- MYSQL_HOST=mysql
- MYSQL_PORT=3306
- MYSQL_DATABASE=activitypub
command: node --import tsx --watch src/app.ts
depends_on:
mysql:
condition: service_healthy
nginx:
build: nginx
ports:
- "80:80"
depends_on:
- activitypub
mysql:
image: mysql:lts
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_USER=ghost
- MYSQL_PASSWORD=password
- MYSQL_DATABASE=activitypub
ports:
- "3307:3306"
healthcheck:
test: "mysql -ughost -ppassword activitypub -e 'select 1'"
interval: 1s
retries: 120
# Testing
activitypub-testing:
build: .
volumes:
- ./src:/opt/activitypub/src
environment:
- PORT=8080
- MYSQL_USER=ghost
- MYSQL_PASSWORD=password
- MYSQL_HOST=mysql-testing
- MYSQL_PORT=3306
- MYSQL_DATABASE=activitypub
- NODE_ENV=testing
- SKIP_SIGNATURE_VERIFICATION=true
command: node --import tsx src/app.ts
depends_on:
mysql-testing:
condition: service_healthy
healthcheck:
test: "wget --spider http://0.0.0.0:8080/ping"
interval: 1s
retries: 120
cucumber-tests:
build: .
volumes:
- ./features:/opt/activitypub/features
- ./cucumber.js:/opt/activitypub/cucumber.js
environment:
- NODE_ENV=testing
command: yarn run cucumber-js
depends_on:
activitypub-testing:
condition: service_healthy
mysql-testing:
image: mysql:lts
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_USER=ghost
- MYSQL_PASSWORD=password
- MYSQL_DATABASE=activitypub
healthcheck:
test: "mysql -ughost -ppassword activitypub -e 'select 1'"
interval: 1s
retries: 120