-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yaml
103 lines (103 loc) · 2.71 KB
/
docker-compose.yaml
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
services:
opensearch:
image: opensearchproject/opensearch:2
environment:
- cluster.name=opensearch-cluster
- node.name=opensearch
- discovery.type=single-node
- DISABLE_SECURITY_PLUGIN=true
- bootstrap.memory_lock=true # along with the memlock settings below, disables swapping
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536 # maximum number of open files for the OpenSearch user, set to at least 65536 on modern systems
hard: 65536
volumes:
- opensearch-data1:/usr/share/opensearch/data
ports:
- '9200:9200'
- '9600:9600' # required for Performance Analyzer
healthcheck:
test: ["CMD-SHELL", "curl --silent --fail localhost:9200/_cluster/health || exit 1"]
interval: 2s
timeout: 2s
retries: 50
api-dummy:
image: ghcr.io/elifesciences/api-dummy:20250116131251.0.0-gd6ce0c6-12809649483-1
platform: linux/amd64
ports:
- '5002:8080'
healthcheck:
test: ["CMD-SHELL", "curl --silent --fail localhost:8080/articles || exit 1"]
interval: 2s
timeout: 2s
retries: 10
localstack:
image: localstack/localstack:4.0.3
environment:
- SERVICES=sqs
- AWS_DEFAULT_REGION=eu-central-1
- HOSTNAME=localstack
- HOSTNAME_EXTERNAL=localstack
ports:
- "127.0.0.1:4566:4566" # LocalStack Gateway
- "127.0.0.1:4510-4559:4510-4559" # external services port range
setup:
build:
context: .
dockerfile: Dockerfile
target: dev
command:
- /bin/bash
- "-c"
- |
composer install
php bin/console queue:create;
php bin/console search:setup;
php bin/console keyvalue:setup
volumes:
- ./:/app
- ./config.php:/app/config.php
depends_on:
opensearch:
condition: service_healthy
localstack:
condition: service_healthy
app:
build:
context: .
dockerfile: Dockerfile
target: dev
environment:
- GATEWAY_HOST=api-dummy:8080
volumes:
- ./:/app
- ./config.php:/app/config.php
- ./.docker/xdebug.ini:/usr/local/etc/php/conf.d/xdebug.ini
ports:
- '8888:80'
depends_on:
setup:
condition: service_completed_successfully
api-dummy:
condition: service_healthy
stdin_open: true
tty: true
extra_hosts:
host.docker.internal: host-gateway
queue-watcher:
build:
context: .
dockerfile: Dockerfile
target: dev
command: bin/console queue:watch
volumes:
- ./:/app
- ./config.php:/app/config.php
depends_on:
setup:
condition: service_completed_successfully
volumes:
opensearch-data1: