-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
58 lines (53 loc) · 1.54 KB
/
docker-compose.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
# YAML Anchors
x-deployment-env: &deployment-env
ENV: ${ENV:-development}
SG_ENV: ${SG_ENV:-development}
x-postgresdb-client-env: &postgresdb-client-env
PG_HOST: ${PG_HOST:-postgres}
PG_PORT: ${PG_PORT:-5432}
PG_DB: ${PG_DB:-place_development}
PG_USER: ${PG_USER:-postgres}
PG_PASSWORD: ${PG_PASSWORD:-password}
services:
test: # Frontends
image: placeos/service-spec-runner:${CRYSTAL_VERSION:-latest}
volumes:
- ${PWD}/src:/app/src
- ${PWD}/spec:/app/spec
- ${PWD}/bin:/app/bin
- ${PWD}/coverage:/app/coverage
- ${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
depends_on:
- postgres
- migrator
environment:
# Environment
GITHUB_ACTION: ${GITHUB_ACTION-}
<<: [*deployment-env, *postgresdb-client-env]
postgres:
hostname: postgres
image: postgres:15-alpine
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 30s
timeout: 30s
retries: 3
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: place_development
ports:
- 5432:5432
migrator:
build:
context: ${PWD}/spec/migration
container_name: migrator
depends_on:
postgres:
condition: service_healthy
environment:
GITHUB_ACTION: ${GITHUB_ACTION:-}
PG_DATABASE_URL: ${PG_DATABASE_URL:-postgresql://postgres:password@postgres:5432/place_development}