oneuptime/docker-compose.dev.yml

459 lines
15 KiB
YAML
Raw Normal View History

2022-04-25 11:47:30 +00:00
# This docker file is for development.
2022-04-22 20:05:25 +00:00
# It connects to debugging ports that help you debug the app.
2021-06-21 20:42:05 +00:00
version: '3.7'
services:
2021-06-21 21:31:43 +00:00
##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'
build:
2022-03-15 21:57:13 +00:00
network: host
2022-04-25 11:47:30 +00:00
context: ./Haraka
2021-06-21 21:31:43 +00:00
args:
PORT: '2525'
environment:
- SMTP_USER=user@oneuptime.com
- SMTP_PASSWORD=oneuptime
2021-06-21 21:31:43 +00:00
- DOMAIN="${DOMAIN}"
- DKIM_PRIVATE_KEY="${DKIM_PRIVATE_KEY}"
- TLS_CERT="${TLS_CERT}"
- TLS_KEY="${TLS_KEY}"
2022-04-27 19:38:55 +00:00
postgres:
image: postgres:latest
restart: always
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
2021-06-21 20:42:05 +00:00
ports:
2022-04-27 19:38:55 +00:00
- '5432:5432'
volumes:
- postgres:/var/lib/postgresql/data
2022-04-25 10:42:08 +00:00
mail:
ports:
- 9110:9229 # Debugging port.
- 3190:3190
build:
network: host
context: .
dockerfile: ./Mail/Dockerfile.dev
env_file:
- ./Mail/.env
environment:
- PORT=3190
- SERVER_URL=http://mail:3190
- IS_SAAS_SERVICE=${IS_SAAS_SERVICE}
- CLUSTER_KEY=test
2021-06-21 20:42:05 +00:00
saml:
image: kenchan0130/simplesamlphp
ports:
- 9876:8080
- 8443:8443
environment:
- SIMPLESAMLPHP_SP_ENTITY_ID=hackerbay.io
- SIMPLESAMLPHP_SP_ASSERTION_CONSUMER_SERVICE=http://localhost:3002/api/user/sso/callback
- SIMPLESAMLPHP_SP_SINGLE_LOGOUT_SERVICE=http://localhost/simplesaml/module.php/saml/sp/saml2-logout.php/test-sp
volumes:
2021-06-21 21:31:43 +00:00
- ./saml/users.php:/var/www/simplesamlphp/config/authsources.php
2021-06-21 20:42:05 +00:00
redis:
image: redis:5.0.7
ports:
- '6390:6379'
command: redis-server
2021-06-21 21:08:35 +00:00
accounts:
ports:
- '3003:3003'
build:
2022-03-15 21:57:13 +00:00
network: host
2022-01-19 12:23:34 +00:00
context: .
2022-04-22 20:05:25 +00:00
dockerfile: ./Accounts/Dockerfile.dev
2021-06-21 21:08:35 +00:00
env_file:
2022-04-22 19:05:16 +00:00
- ./Accounts/.env
2021-06-21 21:08:35 +00:00
environment:
- IS_SAAS_SERVICE=${IS_SAAS_SERVICE}
2021-06-21 21:31:43 +00:00
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/
2021-07-30 12:05:31 +00:00
data-ingestor:
2021-07-20 08:11:16 +00:00
ports:
- '3200:3200'
2022-03-31 19:46:36 +00:00
- '9338:9229' # Debugging port.
2021-07-20 08:11:16 +00:00
build:
2022-03-15 21:57:13 +00:00
network: host
2022-01-19 12:23:34 +00:00
context: .
2022-04-22 20:05:25 +00:00
dockerfile: ./DataIngestor/Dockerfile.dev
2021-07-20 08:11:16 +00:00
env_file:
2022-04-22 19:05:16 +00:00
- ./DataIngestor/.env
2021-07-20 08:11:16 +00:00
environment:
2022-04-22 19:05:16 +00:00
- SERVER_URL=http://dashboard-api:3002
2021-07-20 08:11:16 +00:00
- CLUSTER_KEY=test
2022-04-22 20:05:25 +00:00
- SCRIPT_RUNNER_URL=http://script-runner:3009
2022-01-28 22:34:06 +00:00
- MONGO_URL=mongodb://mongo:27017/oneuptimedb
2021-07-27 16:07:25 +00:00
- REALTIME_URL=http://realtime:3300
depends_on:
- mongo
2022-04-22 20:05:25 +00:00
- script-runner
2022-04-22 19:05:16 +00:00
- dashboard-api
2021-07-27 16:07:25 +00:00
- realtime
2021-07-20 08:11:16 +00:00
volumes:
2021-07-25 14:16:41 +00:00
- ./data-ingestor:/usr/src/app
2021-07-20 08:11:16 +00:00
# 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/
realtime:
ports:
- '3300:3300'
2022-01-21 22:49:08 +00:00
- '9250:9229' # Debugging port.
build:
2022-03-15 21:57:13 +00:00
network: host
2022-01-19 12:23:34 +00:00
context: .
2022-04-22 20:05:25 +00:00
dockerfile: ./Realtime/Dockerfile.dev
env_file:
2022-04-22 19:05:16 +00:00
- ./Realtime/.env
environment:
- CLUSTER_KEY=test
- PORT=3300
volumes:
- ./realtime:/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
2022-04-22 20:05:25 +00:00
probe-api:
2022-01-18 16:38:06 +00:00
ports:
- '3400:3400'
2022-01-21 22:49:08 +00:00
- '9251:9229' # Debugging port.
2022-01-18 16:38:06 +00:00
build:
2022-03-15 21:57:13 +00:00
network: host
2022-01-19 12:23:34 +00:00
context: .
2022-04-11 13:11:16 +00:00
dockerfile: ./ProbeAPI/Dockerfile.dev
2022-01-18 16:38:06 +00:00
env_file:
2022-04-24 19:41:35 +00:00
- ./ProbeAPI/.env
2022-01-18 16:38:06 +00:00
environment:
- CLUSTER_KEY=test
- PORT=3400
2022-01-28 22:34:06 +00:00
- MONGO_URL=mongodb://mongo:27017/oneuptimedb
2022-01-18 16:38:06 +00:00
- REALTIME_URL=http://realtime:3300
2022-01-24 20:29:56 +00:00
volumes:
2022-04-22 20:05:25 +00:00
- ./probe-api:/usr/src/app
2022-01-24 20:29:56 +00:00
# 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/
- /usr/src/app/greenlock.d/
2022-01-18 16:38:06 +00:00
2021-06-21 21:31:43 +00:00
# There can only be one probe in developer docker compose.
2021-06-21 21:51:01 +00:00
probe:
2021-06-21 21:31:43 +00:00
ports:
- '9238:9229' # Debugging port.
build:
2022-03-15 21:57:13 +00:00
network: host
2022-01-19 12:23:34 +00:00
context: .
2022-04-22 20:05:25 +00:00
dockerfile: ./Probe/Dockerfile.dev
2021-06-21 21:31:43 +00:00
env_file:
2022-04-22 19:05:16 +00:00
- ./Probe/.env
2021-06-21 21:31:43 +00:00
environment:
2021-06-22 12:26:24 +00:00
- PORT=3008
2022-04-22 19:05:16 +00:00
- SERVER_URL=http://dashboard-api:3002
- DATA_INGESTOR_URL=http://data-ingestor:3200
2021-06-21 21:31:43 +00:00
- PROBE_NAME=Probe 1
- PROBE_KEY=test-key
- IS_SAAS_SERVICE=${IS_SAAS_SERVICE}
2021-07-12 14:16:38 +00:00
- CLUSTER_KEY=test
2022-04-22 20:05:25 +00:00
- PROBE_API_URL=http://probe-api:3400
2021-06-21 21:31:43 +00:00
volumes:
- ./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/
2021-06-24 20:33:37 +00:00
- /usr/src/app/greenlock.d/
2021-06-21 21:31:43 +00:00
2022-04-22 20:05:25 +00:00
api-docs:
2021-06-21 21:31:43 +00:00
ports:
- '1445:1445'
build:
2022-03-15 21:57:13 +00:00
network: host
2022-01-19 12:23:34 +00:00
context: .
2022-04-11 13:11:16 +00:00
dockerfile: ./ApiDocs/Dockerfile.dev
2021-06-21 21:31:43 +00:00
env_file:
2022-04-11 13:11:16 +00:00
- ./ApiDocs/.env
2021-06-21 21:31:43 +00:00
environment:
- IS_SAAS_SERVICE=${IS_SAAS_SERVICE}
volumes:
2022-04-22 20:05:25 +00:00
- ./api-docs:/usr/src/app
2021-06-21 21:31:43 +00:00
# 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/
2022-04-22 20:05:25 +00:00
init-script:
2021-06-21 21:31:43 +00:00
build:
2022-03-15 21:57:13 +00:00
network: host
2022-01-19 12:23:34 +00:00
context: .
2022-04-11 13:11:16 +00:00
dockerfile: ./InitScript/Dockerfile.dev
2021-06-21 21:31:43 +00:00
ports:
- '1447:1447'
- '9237:9229' # Debugging port.
env_file:
2022-04-11 13:11:16 +00:00
- ./InitScript/.env
2021-06-21 21:31:43 +00:00
environment:
2022-01-28 22:34:06 +00:00
- MONGO_URL=mongodb://mongo:27017/oneuptimedb
2021-06-21 21:31:43 +00:00
- REDIS_HOST=redis
- REDIS_PORT=6379
- IS_SAAS_SERVICE=${IS_SAAS_SERVICE}
2021-06-22 09:32:09 +00:00
- NODE_ENV=development
2021-06-21 21:31:43 +00:00
depends_on:
- mongo
- redis
volumes:
2022-04-22 20:05:25 +00:00
- ./init-script:/usr/src/app
2021-06-21 21:31:43 +00:00
# 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/
2022-04-22 20:05:25 +00:00
script-runner:
2021-06-21 21:31:43 +00:00
ports:
- '3009:3009'
- '9236:9229' # Debugging port.
build:
2022-03-15 21:57:13 +00:00
network: host
2022-01-19 12:23:34 +00:00
context: .
2022-04-11 13:11:16 +00:00
dockerfile: ./ScriptRunner/Dockerfile.dev
env_file:
2022-04-11 13:11:16 +00:00
- ./ScriptRunner/.env
2021-06-21 21:31:43 +00:00
environment:
- IS_SAAS_SERVICE=${IS_SAAS_SERVICE}
2022-04-22 19:05:16 +00:00
- SERVER_URL=http://dashboard-api:3002
2021-07-12 14:16:38 +00:00
- CLUSTER_KEY=test
2021-06-21 21:31:43 +00:00
volumes:
2022-04-22 20:05:25 +00:00
- ./script-runner:/usr/src/app
2021-06-21 21:31:43 +00:00
# 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/
2021-06-21 21:08:35 +00:00
2022-04-22 19:05:16 +00:00
dashboard-api:
2021-06-21 20:42:05 +00:00
ports:
- '3002:3002' # Service Port.
- '9232:9229' # Debugging port.
build:
2022-03-15 21:57:13 +00:00
network: host
2022-01-19 12:23:34 +00:00
context: .
2022-04-22 20:05:25 +00:00
dockerfile: ./DashboardAPI/Dockerfile.dev
2021-06-21 20:42:05 +00:00
env_file:
2022-04-22 19:05:16 +00:00
- ./DashboardAPI/.env
2021-06-21 20:42:05 +00:00
environment:
2022-01-28 22:34:06 +00:00
- MONGO_URL=mongodb://mongo:27017/oneuptimedb
2021-06-21 20:42:05 +00:00
- REDIS_HOST=redis
- REDIS_PORT=6379
- IS_SAAS_SERVICE=${IS_SAAS_SERVICE}
2022-04-22 20:05:25 +00:00
- SCRIPT_RUNNER_URL=http://script-runner:3009
2021-07-12 14:16:38 +00:00
- CLUSTER_KEY=test
2021-09-21 17:27:51 +00:00
- REALTIME_URL=http://realtime:3300
2021-06-21 20:42:05 +00:00
depends_on:
- mongo
- redis
volumes:
2022-04-22 19:05:16 +00:00
- ./dashboard-api:/usr/src/app
2021-06-21 20:42:05 +00:00
# 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/
2021-06-21 22:07:40 +00:00
2021-06-21 20:42:05 +00:00
# Exclude greenlock as well.
- /usr/src/app/greenlock.d/
2021-06-21 21:31:43 +00:00
dashboard:
ports:
- '3000:3000'
build:
2022-03-15 21:57:13 +00:00
network: host
2022-01-19 12:23:34 +00:00
context: .
dockerfile: ./dashboard/Dockerfile.dev
2021-06-21 21:31:43 +00:00
env_file:
2022-04-22 19:05:16 +00:00
- ./Dashboard/.env
2021-06-21 21:31:43 +00:00
environment:
- IS_SAAS_SERVICE=${IS_SAAS_SERVICE}
volumes:
- ./dashboard:/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/
home:
ports:
- '1444:1444'
- '9235:9229' # Debugging port.
env_file:
2022-04-22 19:05:16 +00:00
- ./Home/.env
2021-06-21 21:31:43 +00:00
environment:
- IS_SAAS_SERVICE=${IS_SAAS_SERVICE}
build:
2022-03-15 21:57:13 +00:00
network: host
2022-01-19 12:23:34 +00:00
context: .
dockerfile: ./home/Dockerfile.dev
2021-06-21 21:31:43 +00:00
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/
2022-04-22 20:05:25 +00:00
status-page:
2021-06-21 21:31:43 +00:00
ports:
- '3006:3006'
build:
2022-03-15 21:57:13 +00:00
network: host
2022-01-19 12:23:34 +00:00
context: .
2022-04-11 13:11:16 +00:00
dockerfile: ./StatusPage/Dockerfile.dev
2021-06-21 21:31:43 +00:00
env_file:
2022-04-11 13:11:16 +00:00
- ./StatusPage/.env
2021-06-21 21:31:43 +00:00
environment:
- IS_SAAS_SERVICE=${IS_SAAS_SERVICE}
volumes:
2022-04-22 20:05:25 +00:00
- ./status-page:/usr/src/app
2021-06-21 21:31:43 +00:00
# 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/
2022-04-22 20:05:25 +00:00
admin-dashboard:
2021-06-21 21:31:43 +00:00
ports:
- '3100:3100'
build:
2022-03-15 21:57:13 +00:00
network: host
2022-01-19 12:23:34 +00:00
context: .
2022-04-11 13:11:16 +00:00
dockerfile: ./AdminDashboard/Dockerfile.dev
2021-06-21 21:31:43 +00:00
env_file:
2022-04-11 13:11:16 +00:00
- ./AdminDashboard/.env
2021-06-21 21:31:43 +00:00
environment:
- IS_SAAS_SERVICE=${IS_SAAS_SERVICE}
volumes:
2022-04-22 20:05:25 +00:00
- ./admin-dashboard:/usr/src/app
2021-06-21 21:31:43 +00:00
# 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/
2022-04-22 20:05:25 +00:00
http-test-server:
2021-06-21 21:31:43 +00:00
ports:
- '3010:3010'
- '9234:9229' # Debugging port.
env_file:
2022-04-11 13:11:16 +00:00
- ./HttpTestServer/.env
2021-06-21 21:31:43 +00:00
environment:
- IS_SAAS_SERVICE=${IS_SAAS_SERVICE}
build:
2022-03-15 21:57:13 +00:00
network: host
2022-01-19 12:23:34 +00:00
context: .
2022-04-22 20:05:25 +00:00
dockerfile: ./HTTPTestServer/Dockerfile.dev
2021-06-21 21:31:43 +00:00
volumes:
2022-04-11 13:11:16 +00:00
- ./HttpTestServer:/usr/src/app
2021-06-21 21:31:43 +00:00
# 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/
licensing:
ports:
- '3004:3004'
- '9233:9229' # Debugging port.
env_file:
2022-04-22 20:05:25 +00:00
- ./Licensing/.env
2021-06-21 21:31:43 +00:00
environment:
- IS_SAAS_SERVICE=${IS_SAAS_SERVICE}
build:
2022-03-15 21:57:13 +00:00
network: host
2022-01-21 22:42:58 +00:00
context: .
2022-04-22 20:05:25 +00:00
dockerfile: ./Licensing/Dockerfile.dev
2021-06-21 21:31:43 +00:00
volumes:
2022-04-22 20:05:25 +00:00
- ./Licensing:/usr/src/app
2021-06-21 21:31:43 +00:00
# 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/
2022-04-22 20:05:25 +00:00
application-scanner:
2021-06-25 20:40:24 +00:00
ports:
- '3005:3005'
2021-09-21 19:06:52 +00:00
- '9240:9229' # Debugging port.
2021-06-25 20:40:24 +00:00
build:
2022-03-15 21:57:13 +00:00
network: host
2022-01-19 12:23:34 +00:00
context: .
2022-04-11 13:11:16 +00:00
dockerfile: ./ApplicationScanner/Dockerfile.dev
2021-06-25 20:40:24 +00:00
env_file:
2022-04-11 13:11:16 +00:00
- ./ApplicationScanner/.env
2021-06-25 20:40:24 +00:00
environment:
- PORT=3005
2022-04-22 19:05:16 +00:00
- SERVER_URL=http://dashboard-api:3002
2021-06-25 20:40:24 +00:00
- APPLICATION_SCANNER_NAME=US
- APPPLICATION_SCANNER_KEY=test-key
- IS_SAAS_SERVICE=${IS_SAAS_SERVICE}
2021-07-12 14:16:38 +00:00
- CLUSTER_KEY=test
2021-06-25 20:40:24 +00:00
volumes:
2022-04-11 13:11:16 +00:00
- ./ApplicationScanner:/usr/src/app
2021-06-25 20:40:24 +00:00
# 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/
2022-04-22 20:05:25 +00:00
container-scanner:
2021-07-09 13:00:50 +00:00
ports:
- '3055:3055'
- '9242:9229' # Debugging port.
build:
2022-03-15 21:57:13 +00:00
network: host
2022-01-19 12:23:34 +00:00
context: .
2022-04-11 13:11:16 +00:00
dockerfile: ./ContainerScanner/Dockerfile.dev
2021-07-09 13:00:50 +00:00
env_file:
2022-04-11 13:11:16 +00:00
- ./ContainerScanner/.env
2021-07-09 13:00:50 +00:00
environment:
- PORT=3055
2022-04-22 19:05:16 +00:00
- SERVER_URL=http://dashboard-api:3002
2021-07-09 13:00:50 +00:00
- CONTAINER_SCANNER_NAME=US
- CONTAINER_SCANNER_KEY=test-key
- IS_SAAS_SERVICE=${IS_SAAS_SERVICE}
2021-07-12 14:16:38 +00:00
- CLUSTER_KEY=test
2021-07-09 13:00:50 +00:00
volumes:
2022-04-11 13:11:16 +00:00
- ./ContainerScanner:/usr/src/app
2021-07-09 13:00:50 +00:00
# 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/
2022-04-22 20:05:25 +00:00
lighthouse-runner:
2021-06-30 11:56:08 +00:00
ports:
2021-07-01 13:28:17 +00:00
- '3015:3015'
2021-06-30 11:56:08 +00:00
- '9241:9229' # Debugging port.
build:
2022-03-15 21:57:13 +00:00
network: host
2022-01-19 12:23:34 +00:00
context: .
2022-04-11 13:11:16 +00:00
dockerfile: ./LighthouseRunner/Dockerfile.dev
2021-06-30 11:56:08 +00:00
env_file:
2022-04-11 13:11:16 +00:00
- ./LighthouseRunner/.env
2021-06-30 11:56:08 +00:00
environment:
2021-07-01 13:28:17 +00:00
- PORT=3015
2022-04-22 19:05:16 +00:00
- SERVER_URL=http://dashboard-api:3002
2021-06-30 11:56:08 +00:00
- IS_SAAS_SERVICE=${IS_SAAS_SERVICE}
2021-07-12 14:16:38 +00:00
- CLUSTER_KEY=test
2021-06-30 11:56:08 +00:00
volumes:
2022-04-11 13:11:16 +00:00
- ./LighthouseRunner:/usr/src/app
2021-06-30 11:56:08 +00:00
# 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/
nginx:
depends_on:
- mongo
2022-04-22 19:05:16 +00:00
- dashboard-api
- home
- dashboard
- accounts
2022-04-22 20:05:25 +00:00
- admin-dashboard
restart: always
build:
dockerfile: Dockerfile
2022-03-15 21:57:13 +00:00
network: host
2022-04-25 11:47:30 +00:00
context: ./Nginx
ports:
2021-10-07 11:02:42 +00:00
- '80:80'
- '443:443'
2021-06-21 20:42:05 +00:00
volumes:
2022-04-27 19:38:55 +00:00
postgres: