-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.ci.yml
73 lines (70 loc) · 1.97 KB
/
compose.ci.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
services:
api:
build:
context: .
dockerfile: docker/api/CI/Dockerfile
ports:
- 3000:3000
depends_on:
mongodb:
condition: service_healthy
mariadb:
condition: service_healthy
stdin_open: true
tty: true
restart: unless-stopped
environment:
ENV: "test"
MARIADB_DATABASE: "${MARIADB_DATABASE:?err}"
MARIADB_USERNAME: "${MARIADB_ROOT_USERNAME:?err}"
MARIADB_PASSWORD: "${MARIADB_ROOT_PASSWORD:?err}"
MARIADB_HOST: "mariadb"
MARIADB_PORT: 3306
MONGODB_USERNAME: "${MONGO_INITDB_ROOT_USERNAME:?err}"
MONGODB_PASSWORD: "${MONGO_INITDB_ROOT_PASSWORD:?err}"
MONGODB_HOST: "mongodb"
STRIPE_SECRET_KEY: "${STRIPE_SECRET_KEY}"
container_name: vue-game-api
healthcheck:
test: wget --no-verbose --tries=1 --spider http://localhost:3000/healthz || exit 1
timeout: 30s
interval: 2s
retries: 30
front:
build:
context: .
dockerfile: docker/front/CI/Dockerfile
ports:
- 5173:5173
depends_on:
api:
condition: service_healthy
environment:
VITE_STRIPE_PUBLIC_KEY: "${STRIPE_PUBLIC_KEY}"
stdin_open: true
tty: true
restart: unless-stopped
container_name: vue-game-front
mongodb:
image: mongo
restart: unless-stopped
environment:
MONGO_INITDB_ROOT_USERNAME: "${MONGO_INITDB_ROOT_USERNAME:?err}"
MONGO_INITDB_ROOT_PASSWORD: "${MONGO_INITDB_ROOT_PASSWORD:?err}"
container_name: vue-game-mongodb
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/ping --quiet
timeout: 30s
interval: 2s
retries: 30
mariadb:
image: mariadb:10.10.2
restart: unless-stopped
container_name: vue-game-mariadb
environment:
MARIADB_ROOT_PASSWORD: "${MARIADB_ROOT_PASSWORD:?err}"
healthcheck:
test: [ "CMD", "mysqladmin", "ping", "-h", "localhost" ]
timeout: 30s
interval: 2s
retries: 30