mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-21 14:49:07 +00:00
705 lines
22 KiB
YAML
705 lines
22 KiB
YAML
version: '3.7'
|
|
|
|
services:
|
|
##IMPORTANT:
|
|
## This container is an SMTP server used to send emails.
|
|
## Setup private, tls_cert and tls_key keys before running this part
|
|
haraka:
|
|
ports:
|
|
- '2525:2525'
|
|
{{ if or (eq .Env.ENVIRONMENT "development") (eq .Env.ENVIRONMENT "ci") }}
|
|
build:
|
|
network: host
|
|
context: .
|
|
dockerfile: ./Haraka/Dockerfile
|
|
{{ else }}
|
|
image: oneuptime/haraka:{{ .Env.APP_TAG }}
|
|
{{ end }}
|
|
restart: always
|
|
env_file:
|
|
- ./Haraka/.env
|
|
|
|
redis:
|
|
image: redis:7.0.3
|
|
restart: always
|
|
ports:
|
|
- '6370:6379'
|
|
command: redis-server --requirepass "{{ .Env.REDIS_PASSWORD }}"
|
|
env_file:
|
|
- ./Redis/.env
|
|
|
|
clickhouse:
|
|
image: clickhouse/clickhouse-server:23.2
|
|
restart: always
|
|
env_file:
|
|
- ./Clickhouse/.env
|
|
ports:
|
|
- '8123:8123'
|
|
- '9000:9000'
|
|
- '9440:9440'
|
|
- '9009:9009'
|
|
volumes:
|
|
- clickhouse:/var/lib/clickhouse/
|
|
|
|
postgres:
|
|
image: postgres:latest
|
|
restart: always
|
|
env_file:
|
|
- ./Postgres/.env
|
|
ports:
|
|
- '5400:5432'
|
|
volumes:
|
|
- postgres:/var/lib/postgresql/data
|
|
|
|
mail:
|
|
ports:
|
|
{{ if eq .Env.ENVIRONMENT "development" }}
|
|
- 9110:9229 # Debugging port.
|
|
{{ end }}
|
|
- 3190:3190
|
|
{{ if or (eq .Env.ENVIRONMENT "development") (eq .Env.ENVIRONMENT "ci") }}
|
|
build:
|
|
network: host
|
|
context: .
|
|
dockerfile: ./Mail/Dockerfile
|
|
{{ else }}
|
|
image: oneuptime/mail:{{ .Env.APP_TAG }}
|
|
{{ end }}
|
|
restart: always
|
|
env_file:
|
|
- ./Common/.env
|
|
- ./CommonServer/.env
|
|
- ./Mail/.env
|
|
depends_on:
|
|
- haraka
|
|
{{ if eq .Env.ENVIRONMENT "development" }}
|
|
volumes:
|
|
- ./Mail:/usr/src/app
|
|
# Use node modules of the container and not host system.
|
|
# https://stackoverflow.com/questions/29181032/add-a-volume-to-docker-but-exclude-a-sub-folder
|
|
- /usr/src/app/node_modules/
|
|
- ./Common:/usr/src/Common
|
|
- ./Model:/usr/src/Model
|
|
- ./CommonServer:/usr/src/CommonServer
|
|
- ./CommonUI:/usr/src/CommonUI
|
|
- /usr/src/Common/node_modules/
|
|
- /usr/src/CommonUI/node_modules/
|
|
- /usr/src/CommonServer/node_modules/
|
|
- /usr/src/Model/node_modules/
|
|
{{ end }}
|
|
|
|
|
|
|
|
accounts:
|
|
ports:
|
|
- '3003:3003'
|
|
{{ if or (eq .Env.ENVIRONMENT "development") (eq .Env.ENVIRONMENT "ci") }}
|
|
build:
|
|
network: host
|
|
context: .
|
|
dockerfile: ./Accounts/Dockerfile
|
|
{{ else }}
|
|
image: oneuptime/accounts:{{ .Env.APP_TAG }}
|
|
{{ end }}
|
|
restart: always
|
|
env_file:
|
|
- ./Common/.env
|
|
- ./CommonUI/.env
|
|
- ./Accounts/.env
|
|
|
|
depends_on:
|
|
- identity
|
|
{{ if eq .Env.ENVIRONMENT "development" }}
|
|
volumes:
|
|
- ./Accounts:/usr/src/app
|
|
# Use node modules of the container and not host system.
|
|
# https://stackoverflow.com/questions/29181032/add-a-volume-to-docker-but-exclude-a-sub-folder
|
|
- /usr/src/app/node_modules/
|
|
- ./Common:/usr/src/Common
|
|
- ./Model:/usr/src/Model
|
|
- ./CommonServer:/usr/src/CommonServer
|
|
- ./CommonUI:/usr/src/CommonUI
|
|
- /usr/src/Common/node_modules/
|
|
- /usr/src/CommonUI/node_modules/
|
|
- /usr/src/CommonServer/node_modules/
|
|
- /usr/src/Model/node_modules/
|
|
{{ end }}
|
|
|
|
dashboard:
|
|
ports:
|
|
- '3009:3009'
|
|
{{ if or (eq .Env.ENVIRONMENT "development") (eq .Env.ENVIRONMENT "ci") }}
|
|
build:
|
|
network: host
|
|
context: .
|
|
dockerfile: ./Dashboard/Dockerfile
|
|
{{ else }}
|
|
image: oneuptime/dashboard:{{ .Env.APP_TAG }}
|
|
{{ end }}
|
|
restart: always
|
|
env_file:
|
|
- ./Common/.env
|
|
- ./CommonUI/.env
|
|
- ./Dashboard/.env
|
|
|
|
depends_on:
|
|
- identity
|
|
- accounts
|
|
{{ if eq .Env.ENVIRONMENT "development" }}
|
|
volumes:
|
|
- ./Dashboard:/usr/src/app
|
|
- /usr/src/app/node_modules/
|
|
- ./Common:/usr/src/Common
|
|
- ./Model:/usr/src/Model
|
|
- ./CommonServer:/usr/src/CommonServer
|
|
- ./CommonUI:/usr/src/CommonUI
|
|
- /usr/src/Common/node_modules/
|
|
- /usr/src/CommonUI/node_modules/
|
|
- /usr/src/CommonServer/node_modules/
|
|
- /usr/src/Model/node_modules/
|
|
{{ end }}
|
|
|
|
|
|
status-page:
|
|
ports:
|
|
- '3105:3105' # HTTP UI Port
|
|
{{ if eq .Env.ENVIRONMENT "development" }}
|
|
- 9764:9229 # Debugging port.
|
|
{{ end }}
|
|
{{ if or (eq .Env.ENVIRONMENT "development") (eq .Env.ENVIRONMENT "ci") }}
|
|
build:
|
|
network: host
|
|
context: .
|
|
dockerfile: ./StatusPage/Dockerfile
|
|
{{ else }}
|
|
image: oneuptime/status-page:{{ .Env.APP_TAG }}
|
|
{{ end }}
|
|
restart: always
|
|
env_file:
|
|
- ./Common/.env
|
|
- ./CommonUI/.env
|
|
- ./StatusPage/.env
|
|
|
|
depends_on:
|
|
- accounts
|
|
- dashboard-api
|
|
|
|
{{ if eq .Env.ENVIRONMENT "development" }}
|
|
volumes:
|
|
- ./StatusPage:/usr/src/app
|
|
- /usr/src/app/node_modules/
|
|
- ./Common:/usr/src/Common
|
|
- ./Model:/usr/src/Model
|
|
- ./CommonServer:/usr/src/CommonServer
|
|
- ./CommonUI:/usr/src/CommonUI
|
|
- /usr/src/Common/node_modules/
|
|
- /usr/src/CommonUI/node_modules/
|
|
- /usr/src/CommonServer/node_modules/
|
|
- /usr/src/Model/node_modules/
|
|
{{ end }}
|
|
|
|
dashboard-api:
|
|
ports:
|
|
- '3002:3002'
|
|
{{ if eq .Env.ENVIRONMENT "development" }}
|
|
- '9232:9229' # Debugging port.
|
|
{{ end }}
|
|
{{ if or (eq .Env.ENVIRONMENT "development") (eq .Env.ENVIRONMENT "ci") }}
|
|
build:
|
|
network: host
|
|
context: .
|
|
dockerfile: ./DashboardAPI/Dockerfile
|
|
{{ else }}
|
|
image: oneuptime/dashboard-api:{{ .Env.APP_TAG }}
|
|
{{ end }}
|
|
restart: always
|
|
env_file:
|
|
- ./Common/.env
|
|
- ./CommonServer/.env
|
|
- ./DashboardAPI/.env
|
|
|
|
depends_on:
|
|
- redis
|
|
- postgres
|
|
- mail
|
|
links:
|
|
- redis
|
|
- postgres
|
|
- mail
|
|
{{ if eq .Env.ENVIRONMENT "development" }}
|
|
volumes:
|
|
- ./DashboardAPI:/usr/src/app
|
|
# Use node modules of the container and not host system.
|
|
# https://stackoverflow.com/questions/29181032/add-a-volume-to-docker-but-exclude-a-sub-folder
|
|
- dashboardApiNodeModules:/usr/src/app/node_modules/
|
|
- ./Common:/usr/src/Common
|
|
- ./Model:/usr/src/Model
|
|
- ./CommonServer:/usr/src/CommonServer
|
|
- ./CommonUI:/usr/src/CommonUI
|
|
- dashboardApiCommonNodeModules:/usr/src/Common/node_modules/
|
|
- dashboardApiCommonUINodeModules:/usr/src/CommonUI/node_modules/
|
|
- dashboardApiCommonServerNodeModules:/usr/src/CommonServer/node_modules/
|
|
- dashboardApiModelNodeModules:/usr/src/Model/node_modules/
|
|
{{ end }}
|
|
|
|
|
|
workflow:
|
|
ports:
|
|
- '3099:3099'
|
|
{{ if eq .Env.ENVIRONMENT "development" }}
|
|
- '9212:9229' # Debugging port.
|
|
{{ end }}
|
|
{{ if or (eq .Env.ENVIRONMENT "development") (eq .Env.ENVIRONMENT "ci") }}
|
|
build:
|
|
network: host
|
|
context: .
|
|
dockerfile: ./Workflow/Dockerfile
|
|
{{ else }}
|
|
image: oneuptime/workflow:{{ .Env.APP_TAG }}
|
|
{{ end }}
|
|
restart: always
|
|
env_file:
|
|
- ./Common/.env
|
|
- ./CommonServer/.env
|
|
- ./Workflow/.env
|
|
|
|
depends_on:
|
|
- redis
|
|
- postgres
|
|
- mail
|
|
links:
|
|
- redis
|
|
- postgres
|
|
- mail
|
|
{{ if eq .Env.ENVIRONMENT "development" }}
|
|
volumes:
|
|
- ./Workflow:/usr/src/app
|
|
# Use node modules of the container and not host system.
|
|
# https://stackoverflow.com/questions/29181032/add-a-volume-to-docker-but-exclude-a-sub-folder
|
|
- /usr/src/app/node_modules/
|
|
- ./Common:/usr/src/Common
|
|
- ./Model:/usr/src/Model
|
|
- ./CommonServer:/usr/src/CommonServer
|
|
- ./CommonUI:/usr/src/CommonUI
|
|
- /usr/src/Common/node_modules/
|
|
- /usr/src/CommonUI/node_modules/
|
|
- /usr/src/CommonServer/node_modules/
|
|
- /usr/src/Model/node_modules/
|
|
{{ end }}
|
|
|
|
alert:
|
|
ports:
|
|
- '3088:3088'
|
|
{{ if eq .Env.ENVIRONMENT "development" }}
|
|
- '9222:9229' # Debugging port.
|
|
{{ end }}
|
|
{{ if or (eq .Env.ENVIRONMENT "development") (eq .Env.ENVIRONMENT "ci") }}
|
|
build:
|
|
network: host
|
|
context: .
|
|
dockerfile: ./Alert/Dockerfile
|
|
{{ else }}
|
|
image: oneuptime/alert:{{ .Env.APP_TAG }}
|
|
{{ end }}
|
|
restart: always
|
|
env_file:
|
|
- ./Common/.env
|
|
- ./CommonServer/.env
|
|
- ./Alert/.env
|
|
|
|
depends_on:
|
|
- redis
|
|
- postgres
|
|
- mail
|
|
links:
|
|
- redis
|
|
- postgres
|
|
- mail
|
|
{{ if eq .Env.ENVIRONMENT "development" }}
|
|
volumes:
|
|
- ./Alert:/usr/src/app
|
|
# Use node modules of the container and not host system.
|
|
# https://stackoverflow.com/questions/29181032/add-a-volume-to-docker-but-exclude-a-sub-folder
|
|
- /usr/src/app/node_modules/
|
|
- ./Common:/usr/src/Common
|
|
- ./Model:/usr/src/Model
|
|
- ./CommonServer:/usr/src/CommonServer
|
|
- ./CommonUI:/usr/src/CommonUI
|
|
- /usr/src/Common/node_modules/
|
|
- /usr/src/CommonUI/node_modules/
|
|
- /usr/src/CommonServer/node_modules/
|
|
- /usr/src/Model/node_modules/
|
|
{{ end }}
|
|
|
|
workers:
|
|
ports:
|
|
- '3452:3452'
|
|
{{ if eq .Env.ENVIRONMENT "development" }}
|
|
- '9654:9229' # Debugging port.
|
|
{{ end }}
|
|
{{ if or (eq .Env.ENVIRONMENT "development") (eq .Env.ENVIRONMENT "ci") }}
|
|
build:
|
|
network: host
|
|
context: .
|
|
dockerfile: ./Workers/Dockerfile
|
|
{{ else }}
|
|
image: oneuptime/workers:{{ .Env.APP_TAG }}
|
|
{{ end }}
|
|
restart: always
|
|
env_file:
|
|
- ./Common/.env
|
|
- ./CommonServer/.env
|
|
- ./Workers/.env
|
|
|
|
depends_on:
|
|
- postgres
|
|
- mail
|
|
links:
|
|
- postgres
|
|
- mail
|
|
volumes:
|
|
- ./Certs:/usr/src/Certs
|
|
{{ if eq .Env.ENVIRONMENT "development" }}
|
|
- ./Workers:/usr/src/app
|
|
# Use node modules of the container and not host system.
|
|
# https://stackoverflow.com/questions/29181032/add-a-volume-to-docker-but-exclude-a-sub-folder
|
|
- /usr/src/app/node_modules/
|
|
- ./Common:/usr/src/Common
|
|
- ./Model:/usr/src/Model
|
|
- ./CommonServer:/usr/src/CommonServer
|
|
- ./CommonUI:/usr/src/CommonUI
|
|
- /usr/src/Common/node_modules/
|
|
- /usr/src/CommonUI/node_modules/
|
|
- /usr/src/CommonServer/node_modules/
|
|
- /usr/src/Model/node_modules/
|
|
{{ end }}
|
|
|
|
|
|
{{ if .Env.GLOBAL_PROBE_1_NAME }}
|
|
probe-1:
|
|
{{ if or (eq .Env.ENVIRONMENT "development") (eq .Env.ENVIRONMENT "ci") }}
|
|
build:
|
|
network: host
|
|
context: .
|
|
dockerfile: ./Probe/Dockerfile
|
|
{{ else }}
|
|
image: oneuptime/probe:{{ .Env.APP_TAG }}
|
|
{{ end }}
|
|
restart: always
|
|
env_file:
|
|
- ./Common/.env
|
|
- ./CommonServer/.env
|
|
- ./Probe/.env
|
|
environment:
|
|
- PROBE_NAME={{ .Env.GLOBAL_PROBE_1_NAME }}
|
|
- PROBE_DESCRIPTION={{ .Env.GLOBAL_PROBE_1_DESCRIPTION }}
|
|
- PROBE_KEY={{ .Env.GLOBAL_PROBE_1_KEY }}
|
|
- PROBE_API_URL=http://probe-api:3400
|
|
depends_on:
|
|
- probe-api
|
|
links:
|
|
- probe-api
|
|
volumes:
|
|
- ./Certs:/usr/src/Certs
|
|
{{ if eq .Env.ENVIRONMENT "development" }}
|
|
- ./Probe:/usr/src/app
|
|
# Use node modules of the container and not host system.
|
|
# https://stackoverflow.com/questions/29181032/add-a-volume-to-docker-but-exclude-a-sub-folder
|
|
- /usr/src/app/node_modules/
|
|
- ./Common:/usr/src/Common
|
|
- ./Model:/usr/src/Model
|
|
- ./CommonServer:/usr/src/CommonServer
|
|
- ./CommonUI:/usr/src/CommonUI
|
|
- /usr/src/Common/node_modules/
|
|
- /usr/src/CommonUI/node_modules/
|
|
- /usr/src/CommonServer/node_modules/
|
|
- /usr/src/Model/node_modules/
|
|
{{ end }}
|
|
{{ end }}
|
|
|
|
|
|
{{ if .Env.GLOBAL_PROBE_2_NAME }}
|
|
probe-2:
|
|
{{ if or (eq .Env.ENVIRONMENT "development") (eq .Env.ENVIRONMENT "ci") }}
|
|
build:
|
|
network: host
|
|
context: .
|
|
dockerfile: ./Probe/Dockerfile
|
|
{{ else }}
|
|
image: oneuptime/probe:{{ .Env.APP_TAG }}
|
|
{{ end }}
|
|
restart: always
|
|
env_file:
|
|
- ./Common/.env
|
|
- ./CommonServer/.env
|
|
- ./Probe/.env
|
|
environment:
|
|
- PROBE_NAME={{ .Env.GLOBAL_PROBE_2_NAME }}
|
|
- PROBE_DESCRIPTION={{ .Env.GLOBAL_PROBE_2_DESCRIPTION }}
|
|
- PROBE_KEY={{ .Env.GLOBAL_PROBE_2_KEY }}
|
|
- PROBE_API_URL=http://probe-api:3400
|
|
depends_on:
|
|
- probe-api
|
|
links:
|
|
- probe-api
|
|
volumes:
|
|
- ./Certs:/usr/src/Certs
|
|
{{ end }}
|
|
|
|
identity:
|
|
ports:
|
|
- '3087:3087'
|
|
{{ if eq .Env.ENVIRONMENT "development" }}
|
|
- '9132:9229' # Debugging port.
|
|
{{ end }}
|
|
{{ if or (eq .Env.ENVIRONMENT "development") (eq .Env.ENVIRONMENT "ci") }}
|
|
build:
|
|
network: host
|
|
context: .
|
|
dockerfile: ./Identity/Dockerfile
|
|
{{ else }}
|
|
image: oneuptime/identity:{{ .Env.APP_TAG }}
|
|
{{ end }}
|
|
restart: always
|
|
env_file:
|
|
- ./Common/.env
|
|
- ./CommonServer/.env
|
|
- ./Identity/.env
|
|
|
|
depends_on:
|
|
- redis
|
|
- postgres
|
|
- mail
|
|
links:
|
|
- redis
|
|
- postgres
|
|
- mail
|
|
{{ if eq .Env.ENVIRONMENT "development" }}
|
|
volumes:
|
|
- ./Identity:/usr/src/app
|
|
# Use node modules of the container and not host system.
|
|
# https://stackoverflow.com/questions/29181032/add-a-volume-to-docker-but-exclude-a-sub-folder
|
|
- /usr/src/app/node_modules/
|
|
- ./Common:/usr/src/Common
|
|
- ./Model:/usr/src/Model
|
|
- ./CommonServer:/usr/src/CommonServer
|
|
- ./CommonUI:/usr/src/CommonUI
|
|
- /usr/src/Common/node_modules/
|
|
- /usr/src/CommonUI/node_modules/
|
|
- /usr/src/CommonServer/node_modules/
|
|
- /usr/src/Model/node_modules/
|
|
{{ end }}
|
|
|
|
|
|
probe-api:
|
|
ports:
|
|
- '3400:3400'
|
|
{{ if eq .Env.ENVIRONMENT "development" }}
|
|
- '9932:9229' # Debugging port.
|
|
{{ end }}
|
|
{{ if or (eq .Env.ENVIRONMENT "development") (eq .Env.ENVIRONMENT "ci") }}
|
|
build:
|
|
network: host
|
|
context: .
|
|
dockerfile: ./ProbeAPI/Dockerfile
|
|
{{ else }}
|
|
image: oneuptime/probe-api:{{ .Env.APP_TAG }}
|
|
{{ end }}
|
|
restart: always
|
|
env_file:
|
|
- ./Common/.env
|
|
- ./CommonServer/.env
|
|
- ./ProbeAPI/.env
|
|
|
|
depends_on:
|
|
- redis
|
|
- postgres
|
|
- mail
|
|
links:
|
|
- redis
|
|
- postgres
|
|
- mail
|
|
{{ if eq .Env.ENVIRONMENT "development" }}
|
|
volumes:
|
|
- ./ProbeAPI:/usr/src/app
|
|
# Use node modules of the container and not host system.
|
|
# https://stackoverflow.com/questions/29181032/add-a-volume-to-docker-but-exclude-a-sub-folder
|
|
- /usr/src/app/node_modules/
|
|
- ./Common:/usr/src/Common
|
|
- ./Model:/usr/src/Model
|
|
- ./CommonServer:/usr/src/CommonServer
|
|
- ./CommonUI:/usr/src/CommonUI
|
|
- /usr/src/Common/node_modules/
|
|
- /usr/src/CommonUI/node_modules/
|
|
- /usr/src/CommonServer/node_modules/
|
|
- /usr/src/Model/node_modules/
|
|
{{ end }}
|
|
|
|
file:
|
|
ports:
|
|
- '3125:3125'
|
|
{{ if eq .Env.ENVIRONMENT "development" }}
|
|
- '9012:9229' # Debugging port.
|
|
{{ end }}
|
|
{{ if or (eq .Env.ENVIRONMENT "development") (eq .Env.ENVIRONMENT "ci") }}
|
|
build:
|
|
network: host
|
|
context: .
|
|
dockerfile: ./File/Dockerfile
|
|
{{ else }}
|
|
image: oneuptime/file:{{ .Env.APP_TAG }}
|
|
{{ end }}
|
|
restart: always
|
|
env_file:
|
|
- ./Common/.env
|
|
- ./CommonServer/.env
|
|
- ./File/.env
|
|
|
|
depends_on:
|
|
- postgres
|
|
links:
|
|
- postgres
|
|
{{ if eq .Env.ENVIRONMENT "development" }}
|
|
volumes:
|
|
- ./File:/usr/src/app
|
|
# Use node modules of the container and not host system.
|
|
# https://stackoverflow.com/questions/29181032/add-a-volume-to-docker-but-exclude-a-sub-folder
|
|
- /usr/src/app/node_modules/
|
|
- ./Common:/usr/src/Common
|
|
- ./Model:/usr/src/Model
|
|
- ./CommonServer:/usr/src/CommonServer
|
|
- ./CommonUI:/usr/src/CommonUI
|
|
- /usr/src/Common/node_modules/
|
|
- /usr/src/CommonUI/node_modules/
|
|
- /usr/src/CommonServer/node_modules/
|
|
- /usr/src/Model/node_modules/
|
|
{{ end }}
|
|
|
|
|
|
home:
|
|
ports:
|
|
- '1444:1444'
|
|
{{ if eq .Env.ENVIRONMENT "development" }}
|
|
- '9235:9229' # Debugging port.
|
|
{{ end }}
|
|
restart: always
|
|
env_file:
|
|
- ./Common/.env
|
|
- ./CommonServer/.env
|
|
- ./Home/.env
|
|
{{ if or (eq .Env.ENVIRONMENT "development") (eq .Env.ENVIRONMENT "ci") }}
|
|
build:
|
|
network: host
|
|
context: .
|
|
dockerfile: ./Home/Dockerfile
|
|
{{ else }}
|
|
image: oneuptime/home:{{ .Env.APP_TAG }}
|
|
{{ end }}
|
|
{{ if eq .Env.ENVIRONMENT "development" }}
|
|
volumes:
|
|
- ./Home:/usr/src/app
|
|
# Use node modules of the container and not host system.
|
|
# https://stackoverflow.com/questions/29181032/add-a-volume-to-docker-but-exclude-a-sub-folder
|
|
- /usr/src/app/node_modules/
|
|
- ./Common:/usr/src/Common
|
|
- ./Model:/usr/src/Model
|
|
- ./CommonServer:/usr/src/CommonServer
|
|
- ./CommonUI:/usr/src/CommonUI
|
|
- /usr/src/Common/node_modules/
|
|
- /usr/src/CommonUI/node_modules/
|
|
- /usr/src/CommonServer/node_modules/
|
|
- /usr/src/Model/node_modules/
|
|
{{ end }}
|
|
|
|
api-reference:
|
|
ports:
|
|
- '1445:1445'
|
|
{{ if eq .Env.ENVIRONMENT "development" }}
|
|
- '9178:9229' # Debugging port.
|
|
{{ end }}
|
|
restart: always
|
|
env_file:
|
|
- ./Common/.env
|
|
- ./CommonServer/.env
|
|
- ./ApiReference/.env
|
|
{{ if or (eq .Env.ENVIRONMENT "development") (eq .Env.ENVIRONMENT "ci") }}
|
|
build:
|
|
network: host
|
|
context: .
|
|
dockerfile: ./ApiReference/Dockerfile
|
|
{{ else }}
|
|
image: oneuptime/api-reference:{{ .Env.APP_TAG }}
|
|
{{ end }}
|
|
{{ if eq .Env.ENVIRONMENT "development" }}
|
|
volumes:
|
|
- ./ApiReference:/usr/src/app
|
|
# Use node modules of the container and not host system.
|
|
# https://stackoverflow.com/questions/29181032/add-a-volume-to-docker-but-exclude-a-sub-folder
|
|
- /usr/src/app/node_modules/
|
|
- ./Common:/usr/src/Common
|
|
- ./Model:/usr/src/Model
|
|
- ./CommonServer:/usr/src/CommonServer
|
|
- ./CommonUI:/usr/src/CommonUI
|
|
- /usr/src/Common/node_modules/
|
|
- /usr/src/CommonUI/node_modules/
|
|
- /usr/src/CommonServer/node_modules/
|
|
- /usr/src/Model/node_modules/
|
|
{{ end }}
|
|
|
|
|
|
{{ if or (eq .Env.ENVIRONMENT "development") (eq .Env.ENVIRONMENT "test") }}
|
|
test-server:
|
|
ports:
|
|
- '3800:3800'
|
|
{{ if eq .Env.ENVIRONMENT "development" }}
|
|
- '9141:9229' # Debugging port.
|
|
{{ end }}
|
|
{{ if or (eq .Env.ENVIRONMENT "development") (eq .Env.ENVIRONMENT "ci") }}
|
|
build:
|
|
network: host
|
|
context: .
|
|
dockerfile: ./TestServer/Dockerfile
|
|
{{ else }}
|
|
image: oneuptime/test-server:{{ .Env.APP_TAG }}
|
|
{{ end }}
|
|
restart: always
|
|
env_file:
|
|
- ./Common/.env
|
|
- ./CommonServer/.env
|
|
- ./TestServer/.env
|
|
{{ end }}
|
|
|
|
nginx:
|
|
depends_on:
|
|
- identity
|
|
- accounts
|
|
- dashboard-api
|
|
- dashboard
|
|
- home
|
|
restart: always
|
|
{{ if or (eq .Env.ENVIRONMENT "development") (eq .Env.ENVIRONMENT "ci") }}
|
|
build:
|
|
network: host
|
|
context: .
|
|
dockerfile: ./Nginx/Dockerfile
|
|
{{ else }}
|
|
image: oneuptime/nginx:{{ .Env.APP_TAG }}
|
|
{{ end }}
|
|
ports:
|
|
- '80:80'
|
|
- '443:443'
|
|
volumes:
|
|
- ./Nginx/default.conf:/etc/nginx/conf.d/default.conf
|
|
- ./Certs:/etc/nginx/certs
|
|
volumes:
|
|
postgres:
|
|
clickhouse:
|
|
{{ if eq .Env.ENVIRONMENT "development" }}
|
|
# Add volumes to skip node_modules.
|
|
dashboardApiNodeModules:
|
|
dashboardApiCommonNodeModules:
|
|
dashboardApiCommonUINodeModules:
|
|
dashboardApiCommonServerNodeModules:
|
|
dashboardApiModelNodeModules:
|
|
{{ end }}
|