-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
44 lines (44 loc) · 969 Bytes
/
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
version: "2.4"
services:
app: &service_app
build: .
image: freshshell/fresh-api
restart: unless-stopped
logging: &logging
driver: syslog
options:
tag: '{{.Name}}/{{.ID}}'
depends_on:
cache:
condition: service_healthy
deploy:
replicas: 0
environment:
RACK_ENV: production
MEMCACHE_SERVERS: cache:11211
web:
<<: *service_app
deploy:
replicas: 1
command: "rackup -p 80 -O Verbose"
expose:
- 80
healthcheck:
test: ["CMD-SHELL", "bash -c '</dev/tcp/localhost/80'"]
interval: 10s
timeout: 5s
cache:
image: memcached:1
restart: unless-stopped
command: memcached -m 32
healthcheck:
test: ["CMD-SHELL", "bash -c '</dev/tcp/localhost/11211'"]
interval: 10s
timeout: 5s
logging:
<<: *logging
networks:
default:
driver: bridge
driver_opts:
com.docker.network.bridge.name: br-fresh-api