-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose--prod.yml
50 lines (47 loc) · 1.39 KB
/
docker-compose--prod.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
version: "3.9"
services:
app:
image: "bemiteu/satellite-app:${APP_BUILD_VERSION}"
build:
context: .
dockerfile: DockerfileProduction
target: php_api
cache_from:
- bemiteu/satellite-app
environment:
env: prod
#satellite_index_log_perf: "yes"
DOCKER_SERVICE_ID: "{{.Service.ID}}"
DOCKER_SERVICE_NAME: "{{.Service.Name}}"
DOCKER_SERVICE_LABELS: "{{.Service.Labels}}"
DOCKER_NODE_ID: "{{.Node.ID}}"
DOCKER_NODE_HOST: "{{.Node.Hostname}}"
DOCKER_TASK_ID: "{{.Task.ID}}"
DOCKER_TASK_NAME: "{{.Task.Name}}"
DOCKER_TASK_SLOT: "{{.Task.Slot}}"
volumes:
- ./:/var/www/html
worker:
image: "bemiteu/satellite-app-worker:${APP_BUILD_VERSION}"
build:
context: .
dockerfile: DockerfileProduction
target: php_worker
cache_from:
# using the latest `app` image also for caching worker base layers,
# thus only pulling one image and not two,
# the rebuild time for new layers isn't so important as the time to download images
# todo: validate caching, in CI it seems to download the same image twice and concurrently
- bemiteu/satellite-app
environment:
env: prod
volumes:
- ./:/var/www/html
# nginx:
# build:
# context: ./_nginx
# dockerfile: Dockerfile
# depends_on:
# - app
# ports:
# - '3333:80'