-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
49 lines (46 loc) · 1.13 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
# https://docs.docker.com/compose/compose-file/05-services/
services:
# https://github.com/cao7113/hello-phx/pkgs/container/hello-api-elixir
api:
image: ghcr.io/cao7113/hello-api-elixir
# build: .
# environment:
# MIX_ENV: "prod"
# https://docs.docker.com/compose/compose-file/05-services/#healthcheck
healthcheck:
test: bin/hello_api pid || exit 1
interval: 1m30s
timeout: 10s
retries: 3
start_period: 30s
start_interval: 5s
# http://hello-api-elixir-api-1.orb.local/
curl:
image: curlimages/curl:8.8.0
depends_on:
api:
condition: service_healthy
command: >
sh -c "
# echo
# ping -c 3 api
echo
echo ping api
curl -sSL http://api:4000/ping
echo
echo get build info
curl -sSL http://api:4000/
"
# tool:
# image: busybox
# depends_on:
# api:
# condition: service_healthy
# command: >
# sh -c "
# # echo
# # ping -c 3 api
# echo
# echo ping api at port 4000
# wget -qO- http://api:4000/ping
# "