-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.yml
137 lines (128 loc) · 3.58 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
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
version: "2.3"
services:
npm-install:
image: ${DOCKER_IMAGE:-approov/astropiks:npm-install}
build:
context: ./
args:
NODE_TAG: "${NODE_TAG:-18-slim}"
RELEASE_ENV: "npm-install"
command: "npm install"
networks:
- traefik
volumes:
- ./src/proxy/nodejs:/home/node/workspace
local:
image: ${DOCKER_IMAGE:-approov/astropiks:local}
build:
context: ./
args:
NODE_TAG: "${NODE_TAG:-18-slim}"
RELEASE_ENV: "local"
networks:
- default
ports:
- ${HOST_IP:-127.0.0.1}:${HTTP_PORT:-8080}:${HTTP_PORT:-8080}
volumes:
- ./src/proxy/nodejs:/home/node/workspace
- ./.env:/home/node/workspace/.env
command:
- npm
- start
# useful to run a development server online
dev:
image: ${DOCKER_IMAGE:-approov/astropiks:dev}
build:
context: ./
args:
NODE_TAG: "${NODE_TAG:-18-slim}"
RELEASE_ENV: "dev"
command:
- npm
- start
networks:
- traefik
volumes:
- ./src/proxy/nodejs:/home/node/workspace
- ./.env:/home/node/workspace/.env
labels:
- "traefik.enable=true"
- "traefik.backend=astropiks-dev${RELEASE_TAG:-}"
- "traefik.docker.network=traefik"
- "traefik.port=${HTTP_PORT:-8080}"
- "traefik.frontend.rule=Host:${PUBLIC_DOMAINS:-dev.astropiks.demo.approov.io}"
# useful to test in localhost the staging, rc and prod releases
test:
image: ${DOCKER_IMAGE:-approov/astropiks:test}
build:
context: ./
dockerfile: prod.Dockerfile
args:
RELEASE_ENV: "test"
BUILD_RELEASE_FROM: "${BUILD_RELEASE_FROM:-master}"
ports:
- ${HOST_IP:-127.0.0.1}:${HTTP_PORT:-80}:${HTTP_PORT:-80}
networks:
- default
volumes:
- ./.env:/home/node/app/.env
staging:
image: ${DOCKER_IMAGE:-approov/astropiks:staging}
build:
context: ./
dockerfile: prod.Dockerfile
args:
RELEASE_ENV: "staging"
BUILD_RELEASE_FROM: "${BUILD_RELEASE_FROM:-master}"
restart: unless-stopped
networks:
- traefik
volumes:
- ./.env:/home/node/app/.env
labels:
- "traefik.enable=true"
- "traefik.backend=astropiks-staging${RELEASE_TAG:-}"
- "traefik.docker.network=traefik"
- "traefik.port=${HTTP_PORT:-8080}"
- "traefik.frontend.rule=Host:${PUBLIC_DOMAINS:-staging.astropiks.demo.approov.io}"
rc:
image: ${DOCKER_IMAGE:-approov/astropiks:rc}
build:
context: ./
dockerfile: prod.Dockerfile
args:
RELEASE_ENV: "rc"
BUILD_RELEASE_FROM: "${BUILD_RELEASE_FROM:-master}"
restart: unless-stopped
networks:
- traefik
volumes:
- ./.env:/home/node/app/.env
labels:
- "traefik.enable=true"
- "traefik.backend=astropiks-rc${RELEASE_TAG:-}"
- "traefik.docker.network=traefik"
- "traefik.port=${HTTP_PORT:-8080}"
- "traefik.frontend.rule=Host:${PUBLIC_DOMAINS:-rc.astropiks.demo.approov.io}"
prod:
image: ${DOCKER_IMAGE:-approov/astropiks}
build:
context: ./
dockerfile: prod.Dockerfile
args:
RELEASE_ENV: "prod"
BUILD_RELEASE_FROM: "${BUILD_RELEASE_FROM:-master}"
restart: unless-stopped
networks:
- traefik
volumes:
- ./.env:/home/node/app/.env
labels:
- "traefik.enable=true"
- "traefik.backend=astropiks-prod"
- "traefik.docker.network=traefik"
- "traefik.port=${HTTP_PORT:-8080}"
- "traefik.frontend.rule=Host:${PUBLIC_DOMAINS:-astropiks.demo.approov.io}"
networks:
traefik:
external: true