-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.build.yml
45 lines (45 loc) · 1.07 KB
/
docker-compose.build.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
version: '3.8'
services:
# Base image containing shared libraries
common:
build:
context: .
dockerfile: common/Dockerfile
args:
BUILD_VERSION: $BUILD_VERSION
DOCKER_REGISTRY: $DOCKER_REGISTRY
cache_from:
- $DOCKER_REGISTRY/common:latest
image: common:$BUILD_VERSION
api:
build:
context: .
dockerfile: Dockerfile
args:
BUILD_VERSION: $BUILD_VERSION
BUILD_CONTEXT: api
DOCKER_REGISTRY: $DOCKER_REGISTRY
cache_from:
- $DOCKER_REGISTRY/api:latest
image: api:$BUILD_VERSION
depends_on:
- common
ports:
- 3000:3000
background-worker:
build:
context: .
dockerfile: Dockerfile
args:
BUILD_VERSION: $BUILD_VERSION
BUILD_CONTEXT: background-worker
DOCKER_REGISTRY: $DOCKER_REGISTRY
cache_from:
- $DOCKER_REGISTRY/background-worker:latest
image: background-worker:$BUILD_VERSION
depends_on:
- common
environment:
CRON_JOB_SCHEDULE: "0 * * * *"
ports:
- 3002:3002