-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
88 lines (82 loc) · 2.26 KB
/
docker-compose.yml
File metadata and controls
88 lines (82 loc) · 2.26 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
86
87
88
---
version: "3.9"
services:
app:
image: ${REGISTRY}${IMAGE_OWNER}/${IMAGE_NAME}:${IMAGE_TAG:-latest}
# image: "${REPO_URL}:${IMAGE_TAG:-latest}"
environment:
- PORT=4001
- SECRET_KEY_BASE
- DATABASE_URL
- DATABASE_HOST=postgres
- DATABASE_DB
ports:
- "4001:4001"
depends_on:
- postgres
test:
image: ${REGISTRY}${IMAGE_OWNER}/${IMAGE_NAME}:test
environment:
- MIX_ENV=test
- DATABASE_URL
- DATABASE_HOST=postgres
- DATABASE_DB
- SECRET_KEY_BASE
# stdin_open: true
# tty: true
depends_on:
postgres:
condition: service_healthy
volumes:
- "./junit-reports:/app/_build/test/junit-reports"
# https://github.com/docker-library/docs/blob/master/postgres/README.md
# https://geshan.com.np/blog/2021/12/docker-postgres/
postgres:
image: ${PUBLIC_REGISTRY}postgres:14.1-alpine
restart: always
ports:
- '5432:5432'
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
volumes:
- postgres_data_path:/var/lib/postgresql/data
# - ./db/init.sql:/docker-entrypoint-initdb.d/create_tables.sql
healthcheck:
# test: ["CMD-SHELL", "pg_isready -U postgres -d app_test"]
test: ["CMD-SHELL", "pg_isready"]
start_period: 5s
interval: 2s
timeout: 5s
retries: 20
mssql:
image: mcr.microsoft.com/mssql/server:2019-latest
environment:
ACCEPT_EULA: "Y"
SA_PASSWORD: some!Password
ports:
- "1433:1433"
mysql:
image: "${PUBLIC_REGISTRY}mysql:8"
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
# MYSQL_ROOT_PASSWORD: example
# command: --default-authentication-plugin=mysql_native_password
ports:
- "3306:3306"
apollo-router:
image: ghcr.io/apollographql/router:v1.0.0
ports:
- "4000:4000"
- "1088:1088"
environment:
# https://www.apollographql.com/docs/router/configuration/overview
APOLLO_ROUTER_LOG: "debug"
APOLLO_ROUTER_SUPERGRAPH_PATH: /dist/schema/local.graphql
APOLLO_ROUTER_HOT_RELOAD: "true"
volumes:
# - ./router.yaml:/dist/config/router.yaml"
- ./supergraph.graphql:/dist/schema/local.graphql
volumes:
postgres_data_path:
driver: local