-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
executable file
·85 lines (77 loc) · 2.02 KB
/
compose.yml
File metadata and controls
executable file
·85 lines (77 loc) · 2.02 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
74
75
76
77
78
79
80
81
82
83
84
85
networks:
mailculator-api-deployments-net:
services:
test:
container_name: mailculator_api_test
profiles:
- 'test'
image: golang:1.25-alpine
working_dir: /app
environment:
MYSQL_HOST: '127.0.0.1'
MYSQL_PORT: 3306
MYSQL_USER: 'root'
MYSQL_PASSWORD: 'password'
MYSQL_DATABASE: 'mailculator'
MYSQL_TLS: 'false'
PAYLOAD_STORAGE_PATH: 'testdata/.out/json'
command: ['sh', '-c', 'go mod tidy && go test ./...']
volumes:
- ./.cache/go:/go/pkg/mod:cached
- .:/app
network_mode: host
mysql: &mysql-base
profiles:
- 'none'
image: mariadb:10.11
healthcheck:
test: ['CMD', 'mysqladmin', 'ping', '-h', 'localhost', '-uroot', '-ppassword']
interval: 2s
timeout: 2s
retries: 10
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: mailculator
volumes:
- './docker/mysql/init.sql:/docker-entrypoint-initdb.d/init.sql'
ports:
- '127.0.0.1:3306:3306'
networks:
- mailculator-api-deployments-net
mysql-test:
<<: *mysql-base
container_name: mailculator_api_mysql_test
profiles:
- 'test-deps'
mysql-devcontainer:
<<: *mysql-base
container_name: mailculator_api_mysql_devcontainer
profiles:
- 'devcontainer-deps'
wait-for-mysql-test:
container_name: mailculator_api_wait_for_mysql_test
profiles:
- 'test-deps'
image: golang:1.25-alpine
command: ['echo', 'Service mysql-test is ready']
networks:
- mailculator-api-deployments-net
depends_on:
mysql-test:
condition: service_healthy
dbadmin:
container_name: mailculator_api_dbadmin_devcontainer
profiles:
- 'devcontainer-deps'
image: phpmyadmin:latest
ports:
- '127.0.0.1:9001:80'
environment:
PMA_HOST: 'mysql-devcontainer'
PMA_USER: 'root'
PMA_PASSWORD: 'password'
networks:
- mailculator-api-deployments-net
depends_on:
mysql-devcontainer:
condition: service_healthy