From d5b4bdbf6b7c1b27e6978c90dda1aee29be0298f Mon Sep 17 00:00:00 2001 From: Simon Larsen Date: Mon, 17 Jul 2023 20:06:01 +0100 Subject: [PATCH] remove env tpl --- Accounts/.env | 1 - Accounts/.env.tpl | 1 - AdminDashboard/.env | 0 AdminDashboard/.env.tpl | 0 ApiReference/.env.tpl | 1 - Clickhouse/.env.tpl | 4 - Clickhouse/README.md | 3 + Common/.env.tpl | 9 - CommonServer/.env.tpl | 52 --- CommonUI/.env.tpl | 20 -- Dashboard/.env.tpl | 1 - DashboardAPI/.env.tpl | 1 - File/.env.tpl | 1 - Haraka/.env.tpl | 2 - HelmChart/.env.tpl | 0 Home/.env.tpl | 1 - Identity/.env.tpl | 1 - Integration/.env.tpl | 1 - Licensing/.env.tpl | 3 - LinkShortner/.env.tpl | 1 - Notification/.env.tpl | 14 - Postgres/.env.tpl | 3 - Postgres/README.md | 3 + Probe/.env | 1 - Probe/.env.tpl | 1 - ProbeAPI/.env.tpl | 1 - Realtime/.env.tpl | 2 - Redis/.env.tpl | 1 - StatusPage/.env.tpl | 1 - TestServer/.env.tpl | 1 - Workers/.env.tpl | 2 - Workflow/.env.tpl | 1 - configure.sh | 5 +- docker-compose.temp.yml | 725 ---------------------------------------- 34 files changed, 7 insertions(+), 857 deletions(-) delete mode 100644 Accounts/.env delete mode 100644 Accounts/.env.tpl delete mode 100644 AdminDashboard/.env delete mode 100644 AdminDashboard/.env.tpl delete mode 100644 ApiReference/.env.tpl delete mode 100644 Clickhouse/.env.tpl create mode 100644 Clickhouse/README.md delete mode 100644 Common/.env.tpl delete mode 100644 CommonServer/.env.tpl delete mode 100644 CommonUI/.env.tpl delete mode 100644 Dashboard/.env.tpl delete mode 100755 DashboardAPI/.env.tpl delete mode 100644 File/.env.tpl delete mode 100644 Haraka/.env.tpl delete mode 100644 HelmChart/.env.tpl delete mode 100644 Home/.env.tpl delete mode 100644 Identity/.env.tpl delete mode 100644 Integration/.env.tpl delete mode 100644 Licensing/.env.tpl delete mode 100644 LinkShortner/.env.tpl delete mode 100644 Notification/.env.tpl delete mode 100644 Postgres/.env.tpl create mode 100644 Postgres/README.md delete mode 100644 Probe/.env delete mode 100644 Probe/.env.tpl delete mode 100644 ProbeAPI/.env.tpl delete mode 100644 Realtime/.env.tpl delete mode 100644 Redis/.env.tpl delete mode 100644 StatusPage/.env.tpl delete mode 100644 TestServer/.env.tpl delete mode 100755 Workers/.env.tpl delete mode 100644 Workflow/.env.tpl delete mode 100644 docker-compose.temp.yml diff --git a/Accounts/.env b/Accounts/.env deleted file mode 100644 index 1e2371cfd5..0000000000 --- a/Accounts/.env +++ /dev/null @@ -1 +0,0 @@ -PORT=3003 \ No newline at end of file diff --git a/Accounts/.env.tpl b/Accounts/.env.tpl deleted file mode 100644 index b46531335d..0000000000 --- a/Accounts/.env.tpl +++ /dev/null @@ -1 +0,0 @@ -PORT={{ .Env.ACCOUNTS_PORT }} \ No newline at end of file diff --git a/AdminDashboard/.env b/AdminDashboard/.env deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/AdminDashboard/.env.tpl b/AdminDashboard/.env.tpl deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ApiReference/.env.tpl b/ApiReference/.env.tpl deleted file mode 100644 index 48eb72ff8a..0000000000 --- a/ApiReference/.env.tpl +++ /dev/null @@ -1 +0,0 @@ -PORT={{ .Env.API_DOCS_PORT }} \ No newline at end of file diff --git a/Clickhouse/.env.tpl b/Clickhouse/.env.tpl deleted file mode 100644 index 6bc25d6c7a..0000000000 --- a/Clickhouse/.env.tpl +++ /dev/null @@ -1,4 +0,0 @@ -CLICKHOUSE_USER={{ .Env.CLICKHOUSE_USER }} -CLICKHOUSE_PASSWORD={{ .Env.CLICKHOUSE_PASSWORD }} -CLICKHOUSE_DB=oneuptime -CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT=1 \ No newline at end of file diff --git a/Clickhouse/README.md b/Clickhouse/README.md new file mode 100644 index 0000000000..d5ea4dab89 --- /dev/null +++ b/Clickhouse/README.md @@ -0,0 +1,3 @@ +# Clickhouse + +This folder is for clickhouse related files. \ No newline at end of file diff --git a/Common/.env.tpl b/Common/.env.tpl deleted file mode 100644 index 2d0c0a21eb..0000000000 --- a/Common/.env.tpl +++ /dev/null @@ -1,9 +0,0 @@ -NODE_ENV={{ .Env.ENVIRONMENT }} -BILLING_ENABLED={{ .Env.BILLING_ENABLED }} -BILLING_PUBLIC_KEY={{ .Env.BILLING_PUBLIC_KEY }} -SUBSCRIPTION_PLAN_BASIC={{ .Env.SUBSCRIPTION_PLAN_BASIC }} -SUBSCRIPTION_PLAN_GROWTH={{ .Env.SUBSCRIPTION_PLAN_GROWTH }} -SUBSCRIPTION_PLAN_SCALE={{ .Env.SUBSCRIPTION_PLAN_SCALE }} -SUBSCRIPTION_PLAN_ENTERPRISE={{ .Env.SUBSCRIPTION_PLAN_ENTERPRISE }} -METERED_PLAN_ACTIVE_MONITORING={{ .Env.METERED_PLAN_ACTIVE_MONITORING }} -DOMAIN={{ .Env.DOMAIN }} \ No newline at end of file diff --git a/CommonServer/.env.tpl b/CommonServer/.env.tpl deleted file mode 100644 index d2bbc73127..0000000000 --- a/CommonServer/.env.tpl +++ /dev/null @@ -1,52 +0,0 @@ -ONEUPTIME_SECRET={{ .Env.ONEUPTIME_SECRET }} - -DATABASE_PORT={{ .Env.DATABASE_PORT }} -DATABASE_USERNAME={{ .Env.DATABASE_USERNAME }} -DATABASE_PASSWORD={{ .Env.DATABASE_PASSWORD }} -DATABASE_NAME={{ .Env.DATABASE_NAME }} -DATABASE_HOST={{ .Env.DATABASE_HOST }} - -REDIS_PASSWORD={{ .Env.REDIS_PASSWORD }} -REDIS_HOST={{ .Env.REDIS_HOST }} -REDIS_PORT={{ .Env.REDIS_PORT }} - -ENCRYPTION_SECRET={{ .Env.ENCRYPTION_SECRET }} -DISABLE_SIGNUP={{ .Env.DISABLE_SIGNUP }} - -REALTIME_HOSTNAME={{ .Env.REALTIME_HOSTNAME }} -NOTIFICATION_HOSTNAME={{ .Env.NOTIFICATION_HOSTNAME }} -DASHBOARD_HOSTNAME=d{{ .Env.DASHBOARD_HOSTNAME }} -DASHBOARD_API_HOSTNAME={{ .Env.DASHBOARD_API_HOSTNAME }} -PROBE_API_HOSTNAME={{ .Env.DATA_INGESTOR_HOSTNAME }} -DATA_INGESTOR_HOSTNAME={{ .Env.DATA_INGESTOR_HOSTNAME }} -ACCOUNTS_HOSTNAME={{ .Env.ACCOUNTS_HOSTNAME }} -HOME_HOSTNAME={{ .Env.HOME_HOSTNAME }} -WORKER_HOSTNAME={{ .Env.WORKER_HOSTNAME }} -WORKFLOW_HOSTNAME={{ .Env.WORKFLOW_HOSTNAME }} - -BILLING_PRIVATE_KEY={{ .Env.BILLING_PRIVATE_KEY }} -BILLING_PUBLIC_KEY={{ .Env.BILLING_PUBLIC_KEY }} -BILLING_ENABLED={{ .Env.BILLING_ENABLED }} - -DOMAIN={{ .Env.DOMAIN }} -HTTP_PROTOCOL={{ .Env.HTTP_PROTOCOL }} - -REALTIME_ROUTE={{ .Env.REALTIME_ROUTE }} -NOTIFICATION_ROUTE={{ .Env.NOTIFICATION_ROUTE }} -DASHBOARD_ROUTE={{ .Env.DASHBOARD_ROUTE }} -DASHBOARD_API_ROUTE={{ .Env.DASHBOARD_API_ROUTE }} -PROBE_API_ROUTE={{ .Env.PROBE_API_ROUTE }} -DATA_INGESTOR_ROUTE={{ .Env.DATA_INGESTOR_ROUTE }} -ACCOUNTS_ROUTE={{ .Env.ACCOUNTS_ROUTE }} -HOME_ROUTE={{ .Env.HOME_ROUTE }} -HELMCHARTS_ROUTE={{ .Env.HELMCHARTS_ROUTE }} -API_REFERENCE_ROUTE={{ .Env.API_REFERENCE_ROUTE }} -IDENTITY_ROUTE={{ .Env.IDENTITY_ROUTE }} -FILE_ROUTE={{ .Env.FILE_ROUTE }} -WORKFLOW_ROUTE={{ .Env.WORKFLOW_ROUTE }} -STATUS_PAGE_ROUTE={{ .Env.STATUS_PAGE_ROUTE }} - -IS_SERVER=true - -ANALYTICS_KEY={{ .Env.ANALYTICS_KEY }} -ANALYTICS_HOST={{ .Env.ANALYTICS_HOST }} \ No newline at end of file diff --git a/CommonUI/.env.tpl b/CommonUI/.env.tpl deleted file mode 100644 index e7669edeb8..0000000000 --- a/CommonUI/.env.tpl +++ /dev/null @@ -1,20 +0,0 @@ -REALTIME_ROUTE={{ .Env.REALTIME_ROUTE }} -NOTIFICATION_ROUTE={{ .Env.NOTIFICATION_ROUTE }} -DASHBOARD_ROUTE={{ .Env.DASHBOARD_ROUTE }} -DASHBOARD_API_ROUTE={{ .Env.DASHBOARD_API_ROUTE }} -PROBE_API_ROUTE={{ .Env.PROBE_API_ROUTE }} -DATA_INGESTOR_ROUTE={{ .Env.DATA_INGESTOR_ROUTE }} -ACCOUNTS_ROUTE={{ .Env.ACCOUNTS_ROUTE }} -HOME_ROUTE={{ .Env.HOME_ROUTE }} -HELMCHARTS_ROUTE={{ .Env.HELMCHARTS_ROUTE }} -API_REFERENCE_ROUTE={{ .Env.API_REFERENCE_ROUTE }} -IDENTITY_ROUTE={{ .Env.IDENTITY_ROUTE }} -WORKFLOW_ROUTE={{ .Env.WORKFLOW_ROUTE }} -FILE_ROUTE={{ .Env.FILE_ROUTE }} -STATUS_PAGE_ROUTE={{ .Env.STATUS_PAGE_ROUTE }} -IS_SERVER=false -STATUS_PAGE_CNAME_RECORD={{ .Env.STATUS_PAGE_CNAME_RECORD }} -DOMAIN={{ .Env.DOMAIN }} -HTTP_PROTOCOL={{ .Env.HTTP_PROTOCOL }} -ANALYTICS_KEY={{ .Env.ANALYTICS_KEY }} -ANALYTICS_HOST={{ .Env.ANALYTICS_HOST }} \ No newline at end of file diff --git a/Dashboard/.env.tpl b/Dashboard/.env.tpl deleted file mode 100644 index 6e5e8b1aa9..0000000000 --- a/Dashboard/.env.tpl +++ /dev/null @@ -1 +0,0 @@ -PORT={{ .Env.DASHBOARD_PORT }} \ No newline at end of file diff --git a/DashboardAPI/.env.tpl b/DashboardAPI/.env.tpl deleted file mode 100755 index f610414cce..0000000000 --- a/DashboardAPI/.env.tpl +++ /dev/null @@ -1 +0,0 @@ -PORT={{ .Env.DASHBOARD_API_PORT }} \ No newline at end of file diff --git a/File/.env.tpl b/File/.env.tpl deleted file mode 100644 index ea99ae2ff9..0000000000 --- a/File/.env.tpl +++ /dev/null @@ -1 +0,0 @@ -PORT={{ .Env.FILE_PORT }} \ No newline at end of file diff --git a/Haraka/.env.tpl b/Haraka/.env.tpl deleted file mode 100644 index 58e2369a9d..0000000000 --- a/Haraka/.env.tpl +++ /dev/null @@ -1,2 +0,0 @@ -SMTP_USER={{ .Env.INTERNAL_SMTP_USER }} -SMTP_PASSWORD={{ .Env.INTERNAL_SMTP_PASSWORD }} \ No newline at end of file diff --git a/HelmChart/.env.tpl b/HelmChart/.env.tpl deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/Home/.env.tpl b/Home/.env.tpl deleted file mode 100644 index 00eb86f2e5..0000000000 --- a/Home/.env.tpl +++ /dev/null @@ -1 +0,0 @@ -PORT={{ .Env.HOME_PORT }} \ No newline at end of file diff --git a/Identity/.env.tpl b/Identity/.env.tpl deleted file mode 100644 index 9ad33d8ba3..0000000000 --- a/Identity/.env.tpl +++ /dev/null @@ -1 +0,0 @@ -PORT={{ .Env.IDENTITY_PORT }} \ No newline at end of file diff --git a/Integration/.env.tpl b/Integration/.env.tpl deleted file mode 100644 index d9bb5fd096..0000000000 --- a/Integration/.env.tpl +++ /dev/null @@ -1 +0,0 @@ -ONEUPTIME_SECRET={{ .Env.ONEUPTIME_SECRET }} \ No newline at end of file diff --git a/Licensing/.env.tpl b/Licensing/.env.tpl deleted file mode 100644 index aca4f8bb5a..0000000000 --- a/Licensing/.env.tpl +++ /dev/null @@ -1,3 +0,0 @@ -AIRTABLE_API_KEY={{ .Env.AIRTABLE_API_KEY }} -AIRTABLE_BASE_ID={{ .Env.AIRTABLE_BASE_ID }} -TOKEN_SECRET={{ .Env.TOKEN_SECRET }} \ No newline at end of file diff --git a/LinkShortner/.env.tpl b/LinkShortner/.env.tpl deleted file mode 100644 index 3af74c7eac..0000000000 --- a/LinkShortner/.env.tpl +++ /dev/null @@ -1 +0,0 @@ -PORT={{ .Env.LINK_SHORTNER_PORT }} \ No newline at end of file diff --git a/Notification/.env.tpl b/Notification/.env.tpl deleted file mode 100644 index 2c1eac8d59..0000000000 --- a/Notification/.env.tpl +++ /dev/null @@ -1,14 +0,0 @@ -PORT={{ .Env.NOTIFICATION_PORT }} -SMTP_USERNAME={{ .Env.SMTP_USERNAME }} -SMTP_PASSWORD={{ .Env.SMTP_PASSWORD }} -SMTP_PORT={{ .Env.SMTP_PORT }} -SMTP_EMAIL={{ .Env.SMTP_EMAIL }} -SMTP_FROM_NAME={{ .Env.SMTP_FROM_NAME }} -SMTP_IS_SECURE={{ .Env.SMTP_IS_SECURE }} -SMTP_HOST={{ .Env.SMTP_HOST }} -SENDGRID_API_KEY={{ .Env.SENDGRID_API_KEY }} -TWILIO_ACCOUNT_SID={{ .Env.TWILIO_ACCOUNT_SID }} -TWILIO_AUTH_TOKEN={{ .Env.TWILIO_AUTH_TOKEN }} -TWILIO_PHONE_NUMBER={{ .Env.TWILIO_PHONE_NUMBER }} -SMS_DEFAULT_COST_IN_CENTS={{ .Env.SMS_DEFAULT_COST_IN_CENTS }} -CALL_DEFAULT_COST_IN_CENTS_PER_MINUTE={{ .Env.CALL_DEFAULT_COST_IN_CENTS_PER_MINUTE }} \ No newline at end of file diff --git a/Postgres/.env.tpl b/Postgres/.env.tpl deleted file mode 100644 index 79b1b23d43..0000000000 --- a/Postgres/.env.tpl +++ /dev/null @@ -1,3 +0,0 @@ -POSTGRES_USER={{ .Env.DATABASE_USERNAME }} -POSTGRES_PASSWORD={{ .Env.DATABASE_PASSWORD }} -POSTGRES_DB={{ .Env.DATABASE_NAME }} \ No newline at end of file diff --git a/Postgres/README.md b/Postgres/README.md new file mode 100644 index 0000000000..0bed763781 --- /dev/null +++ b/Postgres/README.md @@ -0,0 +1,3 @@ +# Postgres + +This folder is for postgres related files. \ No newline at end of file diff --git a/Probe/.env b/Probe/.env deleted file mode 100644 index e17e2fecd4..0000000000 --- a/Probe/.env +++ /dev/null @@ -1 +0,0 @@ -PORT=3500 \ No newline at end of file diff --git a/Probe/.env.tpl b/Probe/.env.tpl deleted file mode 100644 index db282a8444..0000000000 --- a/Probe/.env.tpl +++ /dev/null @@ -1 +0,0 @@ -PORT={{ .Env.PROBE_PORT }} \ No newline at end of file diff --git a/ProbeAPI/.env.tpl b/ProbeAPI/.env.tpl deleted file mode 100644 index c155eb0178..0000000000 --- a/ProbeAPI/.env.tpl +++ /dev/null @@ -1 +0,0 @@ -PORT={{ .Env.PROBE_API_PORT }} \ No newline at end of file diff --git a/Realtime/.env.tpl b/Realtime/.env.tpl deleted file mode 100644 index 12310cf6b9..0000000000 --- a/Realtime/.env.tpl +++ /dev/null @@ -1,2 +0,0 @@ -ONEUPTIME_SECRET={{ .Env.ONEUPTIME_SECRET }} -PORT={{ .Env.REALTIME_PORT }} \ No newline at end of file diff --git a/Redis/.env.tpl b/Redis/.env.tpl deleted file mode 100644 index 517526760a..0000000000 --- a/Redis/.env.tpl +++ /dev/null @@ -1 +0,0 @@ -REDIS_PASSWORD={{ .Env.REDIS_PASSWORD }} \ No newline at end of file diff --git a/StatusPage/.env.tpl b/StatusPage/.env.tpl deleted file mode 100644 index 538147c0df..0000000000 --- a/StatusPage/.env.tpl +++ /dev/null @@ -1 +0,0 @@ -PORT={{ .Env.STATUS_PAGE_PORT }} \ No newline at end of file diff --git a/TestServer/.env.tpl b/TestServer/.env.tpl deleted file mode 100644 index 5e7a2e0f0d..0000000000 --- a/TestServer/.env.tpl +++ /dev/null @@ -1 +0,0 @@ -PORT={{ .Env.TEST_SERVER_PORT }} \ No newline at end of file diff --git a/Workers/.env.tpl b/Workers/.env.tpl deleted file mode 100755 index 6aa79ab9a6..0000000000 --- a/Workers/.env.tpl +++ /dev/null @@ -1,2 +0,0 @@ -PORT={{ .Env.WORKERS_PORT }} -ENVIRONMENT={{ .Env.ENVIRONMENT }} \ No newline at end of file diff --git a/Workflow/.env.tpl b/Workflow/.env.tpl deleted file mode 100644 index f426310513..0000000000 --- a/Workflow/.env.tpl +++ /dev/null @@ -1 +0,0 @@ -PORT={{ .Env.WORKFLOW_PORT }} \ No newline at end of file diff --git a/configure.sh b/configure.sh index 76b6940a91..de2f334419 100644 --- a/configure.sh +++ b/configure.sh @@ -206,7 +206,4 @@ for directory_name in $(find . -maxdepth 1 -type d) ; do if [ -f "$directory_name/Dockerfile.tpl" ]; then cat $directory_name/Dockerfile.tpl | gomplate > $directory_name/Dockerfile fi -done - -# Convert nginx conf template to nginx -cat ./Nginx/default.tpl.conf | gomplate > ./Nginx/default.conf \ No newline at end of file +done \ No newline at end of file diff --git a/docker-compose.temp.yml b/docker-compose.temp.yml deleted file mode 100644 index ee6fb00d64..0000000000 --- a/docker-compose.temp.yml +++ /dev/null @@ -1,725 +0,0 @@ -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 - - notification: - ports: - {{ if eq .Env.ENVIRONMENT "development" }} - - 9111:9229 # Debugging port. - {{ end }} - - 3191:3191 - {{ if or (eq .Env.ENVIRONMENT "development") (eq .Env.ENVIRONMENT "ci") }} - build: - network: host - context: . - dockerfile: ./Notification/Dockerfile - {{ else }} - image: oneuptime/notification:{{ .Env.APP_TAG }} - {{ end }} - restart: always - env_file: - - ./Common/.env - - ./CommonServer/.env - - ./Notification/.env - depends_on: - - haraka - {{ if eq .Env.ENVIRONMENT "development" }} - volumes: - - ./Notification:/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 - - notification - links: - - redis - - postgres - - notification - {{ 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 }} - - - link-shortner: - ports: - - '3521:3521' - {{ if eq .Env.ENVIRONMENT "development" }} - - '9826:9229' # Debugging port. - {{ end }} - {{ if or (eq .Env.ENVIRONMENT "development") (eq .Env.ENVIRONMENT "ci") }} - build: - network: host - context: . - dockerfile: ./LinkShortner/Dockerfile - {{ else }} - image: oneuptime/link-shortner:{{ .Env.APP_TAG }} - {{ end }} - restart: always - env_file: - - ./Common/.env - - ./CommonServer/.env - - ./LinkShortner/.env - depends_on: - - redis - - postgres - links: - - redis - - postgres - {{ if eq .Env.ENVIRONMENT "development" }} - volumes: - - ./LinkShortner:/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 }} - - 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 - - notification - links: - - redis - - postgres - - notification - {{ 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 }} - - 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 - - notification - links: - - postgres - - notification - 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 eq .Env.ENVIRONMENT "development" }} - ports: - - '9655:9229' # Debugging port. - {{ end }} - {{ 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 - {{ 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 }} - - 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 - - notification - links: - - redis - - postgres - - notification - {{ 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 - - notification - links: - - redis - - postgres - - notification - {{ 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 - volumes: - - ./TestServer:/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 }} - - nginx: - depends_on: - - identity - - accounts - - dashboard-api - - dashboard - - home - - notification - restart: always - image: nginx:1.23.3-alpine - 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 }}