Repository navigation
Expand file tree
/
Copy pathdocker-compose.standalone.yml
More file actions
73 lines (69 loc) · 1.86 KB
/
Copy pathdocker-compose.standalone.yml
File metadata and controls
73 lines (69 loc) · 1.86 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Self-contained stack for running GoGento independently, with no external
# network or existing Magento install required. Seeds a minimal sample
# dataset via cmd/seed so integration tests have something to run against.
#
# Usage:
# docker compose -f docker-compose.standalone.yml up -d mysql
# docker compose -f docker-compose.standalone.yml run --rm seed
# docker compose -f docker-compose.standalone.yml run --rm test
services:
mysql:
image: mysql:8.0
environment:
MYSQL_DATABASE: magento
MYSQL_USER: magento
MYSQL_PASSWORD: magento
MYSQL_ROOT_PASSWORD: root
ports:
- "3309:3306"
volumes:
- gogento_standalone_mysql:/var/lib/mysql
security_opt:
- seccomp:unconfined
ulimits:
nproc:
soft: 8192
hard: 8192
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-proot"]
interval: 5s
timeout: 5s
retries: 20
seed:
build:
context: .
dockerfile: Dockerfile.test
depends_on:
mysql:
condition: service_healthy
environment:
MYSQL_HOST: mysql
MYSQL_PORT: "3306"
MYSQL_USER: magento
MYSQL_PASS: magento
MYSQL_DB: magento
volumes:
- .:/app
working_dir: /app
command: go run ./cmd/seed
test:
build:
context: .
dockerfile: Dockerfile.test
depends_on:
mysql:
condition: service_healthy
environment:
MYSQL_HOST: mysql
MYSQL_PORT: "3306"
MYSQL_USER: magento
MYSQL_PASS: magento
MYSQL_DB: magento
volumes:
- .:/app
working_dir: /app
command: >
sh -c "go test ./cmd/... ./api/... ./cron/... ./core/cache/... ./graphql/registry/...
./tests/api/... ./tests/graphql/... ./tests/model/... ./tests/service/... ./tests/integration/... -v"
volumes:
gogento_standalone_mysql: