-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
71 lines (64 loc) · 2.16 KB
/
docker-compose.yml
File metadata and controls
71 lines (64 loc) · 2.16 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
version: "3.7"
# YAML Anchors
x-deployment-env: &deployment-env
ENV: ${ENV:-development}
SG_ENV: ${SG_ENV:-development}
TZ: $TZ
PG_DATABASE_URL: ${PG_DATABASE_URL:-postgresql://postgres:password@postgres:5432/ingest_spec}
x-elastic-client-env: &elastic-client-env
# ELASTIC_HOST: ${ELASTIC_HOST:-elastic}
# ELASTIC_PORT: ${ELASTIC_PORT:-9200}
# Basic auth credentials (alternative to ELASTIC_URI)
# ELASTIC_USER: ${ELASTIC_USER:-elastic}
# ELASTIC_PASSWORD: ${ELASTIC_PASSWORD:-testpass123}
# Alternative: use ELASTIC_URI with embedded credentials
ELASTIC_URI: ${ELASTIC_URI:-http://elastic:testpass123@elastic:9200}
x-search-ingest-client-env: &search-ingest-client-env
PLACE_SEARCH_INGEST_URI: ${PLACE_SEARCH_INGEST_URI:-http://search-ingest:3000}
services:
test:
image: placeos/service-spec-runner:${CRYSTAL_VERSION:-latest}
volumes:
- ${PWD}/spec:/app/spec
- ${PWD}/src:/app/src
- ${PWD}/lib:/app/lib
- ${PWD}/shard.lock:/app/shard.lock
- ${PWD}/shard.override.yml:/app/shard.override.yml
- ${PWD}/shard.yml:/app/shard.yml.input
- ${PWD}/coverage:/app/coverage
- ${PWD}/.ameba.yml:/app/.ameba.yml
depends_on:
- elastic
- postgres
environment:
# Service Hosts
<<: [*elastic-client-env, *deployment-env]
# Environment
GITHUB_ACTION: ${GITHUB_ACTION:-}
elastic:
image: elasticsearch:${ELASTIC_VERSION:-7.17.6}
restart: always
environment:
discovery.type: single-node
# Enable security features
xpack.security.enabled: "true"
# Set built-in user passwords
ELASTIC_PASSWORD: ${ELASTIC_PASSWORD:-testpass123}
# Disable SSL for testing (not recommended for production)
xpack.security.http.ssl.enabled: "false"
xpack.security.transport.ssl.enabled: "false"
postgres:
hostname: postgres
image: postgres:13-alpine
container_name: postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 3
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: ingest_spec
ports:
- "5432:5432"