Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/Resgrid/Core into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
ucswift committed Mar 20, 2022
2 parents 5b787fa + ffbab84 commit cbf7ebb
Show file tree
Hide file tree
Showing 15 changed files with 134 additions and 65 deletions.
102 changes: 102 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -202,3 +202,105 @@ Docker/docker-data/dms/mail-state/lib-clamav/daily.cvd
Docker/docker-data/dms/mail-state/lib-clamav/freshclam.dat

Docker/docker-data/dms/mail-state/lib-clamav/main.cvd
Docker/docker-data/dms/config/dovecot-quotas.cf
Docker/docker-data/dms/config/mailconfig
Docker/docker-data/dms/config/postfix-aliases.cf
Docker/docker-data/dms/mail-data/maildata
Docker/docker-data/dms/mail-logs/maillogs
Docker/docker-data/dms/mail-state/mailstate
Docker/docker-data/dms/mail-state/lib-amavis/.razor/identity
Docker/docker-data/dms/mail-state/lib-amavis/.razor/identity-ruYtA-SdhH
Docker/docker-data/dms/mail-state/lib-amavis/.razor/server.n001.cloudmark.com.conf
Docker/docker-data/dms/mail-state/lib-amavis/.razor/server.n004.cloudmark.com.conf
Docker/docker-data/dms/mail-state/lib-amavis/.razor/servers.catalogue.lst
Docker/docker-data/dms/mail-state/lib-amavis/.razor/servers.discovery.lst
Docker/docker-data/dms/mail-state/lib-amavis/.razor/servers.nomination.lst
Docker/docker-data/dms/mail-state/lib-spamassassin/sa-update-keys/pubring.kbx
Docker/docker-data/dms/mail-state/lib-spamassassin/sa-update-keys/trustdb.gpg
Docker/docker-data/sql/backup/sqlbackups
Docker/docker-data/sql/data/Entropy.bin
Docker/docker-data/sql/data/master.mdf
Docker/docker-data/sql/data/mastlog.ldf
Docker/docker-data/sql/data/model_msdbdata.mdf
Docker/docker-data/sql/data/model_msdblog.ldf
Docker/docker-data/sql/data/model_replicatedmaster.ldf
Docker/docker-data/sql/data/model_replicatedmaster.mdf
Docker/docker-data/sql/data/model.mdf
Docker/docker-data/sql/data/modellog.ldf
Docker/docker-data/sql/data/msdbdata.mdf
Docker/docker-data/sql/data/msdblog.ldf
Docker/docker-data/sql/data/Resgrid_log.ldf
Docker/docker-data/sql/data/Resgrid.mdf
Docker/docker-data/sql/data/ResgridOIDC_log.ldf
Docker/docker-data/sql/data/ResgridOIDC.mdf
Docker/docker-data/sql/data/ResgridWorkers_log.ldf
Docker/docker-data/sql/data/ResgridWorkers.mdf
Docker/docker-data/sql/data/sqldata
Docker/docker-data/sql/data/tempdb.mdf
Docker/docker-data/sql/data/templog.ldf
Docker/docker-data/sql/log/errorlog
Docker/docker-data/sql/log/errorlog.1
Docker/docker-data/sql/log/errorlog.2
Docker/docker-data/sql/log/errorlog.3
Docker/docker-data/sql/log/errorlog.4
Docker/docker-data/sql/log/errorlog.5
Docker/docker-data/sql/log/errorlog.6
Docker/docker-data/sql/log/errorlog.7
Docker/docker-data/sql/log/errorlog.8
Docker/docker-data/sql/log/errorlog.9
Docker/docker-data/sql/log/errorlog.10
Docker/docker-data/sql/log/errorlog.11
Docker/docker-data/sql/log/errorlog.12
Docker/docker-data/sql/log/errorlog.13
Docker/docker-data/sql/log/errorlog.14
Docker/docker-data/sql/log/errorlog.15
Docker/docker-data/sql/log/errorlog.16
Docker/docker-data/sql/log/errorlog.17
Docker/docker-data/sql/log/errorlog.18
Docker/docker-data/sql/log/errorlog.19
Docker/docker-data/sql/log/HkEngineEventFile_0_132921975549100000.xel
Docker/docker-data/sql/log/HkEngineEventFile_0_132922007317990000.xel
Docker/docker-data/sql/log/HkEngineEventFile_0_132922009309080000.xel
Docker/docker-data/sql/log/HkEngineEventFile_0_132922013218750000.xel
Docker/docker-data/sql/log/HkEngineEventFile_0_132922018741370000.xel
Docker/docker-data/sql/log/HkEngineEventFile_0_132922033212920000.xel
Docker/docker-data/sql/log/HkEngineEventFile_0_132922067366660000.xel
Docker/docker-data/sql/log/HkEngineEventFile_0_132922075764680000.xel
Docker/docker-data/sql/log/HkEngineEventFile_0_132922088137910000.xel
Docker/docker-data/sql/log/HkEngineEventFile_0_132922111474730000.xel
Docker/docker-data/sql/log/HkEngineEventFile_0_132922117751690000.xel
Docker/docker-data/sql/log/HkEngineEventFile_0_132922122624170000.xel
Docker/docker-data/sql/log/HkEngineEventFile_0_132922132763460000.xel
Docker/docker-data/sql/log/HkEngineEventFile_0_132922142267410000.xel
Docker/docker-data/sql/log/HkEngineEventFile_0_132922152684910000.xel
Docker/docker-data/sql/log/HkEngineEventFile_0_132922153785260000.xel
Docker/docker-data/sql/log/HkEngineEventFile_0_132922154586090000.xel
Docker/docker-data/sql/log/HkEngineEventFile_0_132922155443490000.xel
Docker/docker-data/sql/log/HkEngineEventFile_0_132922211494070000.xel
Docker/docker-data/sql/log/log_16.trc
Docker/docker-data/sql/log/log_17.trc
Docker/docker-data/sql/log/log_18.trc
Docker/docker-data/sql/log/log_19.trc
Docker/docker-data/sql/log/log_20.trc
Docker/docker-data/sql/log/sqllogs
Docker/docker-data/sql/log/system_health_0_132922111481530000.xel
Docker/docker-data/sql/log/system_health_0_132922117759410000.xel
Docker/docker-data/sql/log/system_health_0_132922122632370000.xel
Docker/docker-data/sql/log/system_health_0_132922132771730000.xel
Docker/docker-data/sql/log/system_health_0_132922142272820000.xel
Docker/docker-data/sql/log/system_health_0_132922152690110000.xel
Docker/docker-data/sql/log/system_health_0_132922153791210000.xel
Docker/docker-data/sql/log/system_health_0_132922154593260000.xel
Docker/docker-data/sql/log/system_health_0_132922155450540000.xel
Docker/docker-data/sql/log/system_health_0_132922211502270000.xel
Docker/docker-data/dms/config/mailconfig
Docker/docker-data/dms/mail-data/maildata
Docker/docker-data/dms/mail-logs/maillogs
Docker/docker-data/dms/mail-state/mailstate
Docker/docker-data/sql/backup/sqlbackups
Docker/docker-data/sql/data/sqldata
Docker/docker-data/sql/log/sqllogs
Docker/docker-data/dms/config/mailconfig
Docker/docker-data/dms/mail-data/maildata
Docker/docker-data/dms/mail-logs/maillogs
Docker/docker-data/dms/mail-state/mailstate
15 changes: 4 additions & 11 deletions Docker/db/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
ARG BUILD_VERSION=3.5.0

# Choose ubuntu version
FROM mcr.microsoft.com/mssql/server:2019-CU13-ubuntu-20.04

# Create app directory
WORKDIR /usr/src/app

# Copy initialization scripts
COPY . /usr/src/app
COPY create-databases.sql /usr/src/app/create-databases.sql
COPY initdbs.sh /usr/src/app/initdbs.sh
COPY entrypoint.sh /usr/src/app/entrypoint.sh

# Expose port 1433 in case accessing from other container
# Expose port externally from docker-compose.yml
EXPOSE 1433

# Run Microsoft SQl Server and initialization script (at the same time)
CMD /bin/bash /usr/src/app/entrypoint.sh
CMD /bin/bash ./entrypoint.sh
3 changes: 1 addition & 2 deletions Docker/db/entrypoint.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
# Run Microsoft SQl Server and initialization script (at the same time)
/usr/src/app/run-initialization.sh & /opt/mssql/bin/sqlservr
/usr/src/app/initdbs.sh & /opt/mssql/bin/sqlservr
2 changes: 2 additions & 0 deletions Docker/db/initdbs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
sleep 90s
/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P Resgrid123!! -d master -i create-databases.sql
6 changes: 0 additions & 6 deletions Docker/db/run-initialization.sh

This file was deleted.

63 changes: 20 additions & 43 deletions Docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3.9'

services:
web:
image: "resgridllc/resgridwebcore:0.5.19"
image: "resgridllc/resgridwebcore:0.5.23"
ports:
- "5151:80"
env_file:
Expand All @@ -16,10 +16,10 @@ services:
- worker
environment:
- WAIT_HOSTS=db:1433,redis:6379,rabbitmq:15672,api:80
- WAIT_AFTER=90
- WAIT_TIMEOUT=300

api:
image: "resgridllc/resgridwebservices:0.5.19"
image: "resgridllc/resgridwebservices:0.5.23"
ports:
- "5152:80"
env_file:
Expand All @@ -32,10 +32,10 @@ services:
- worker
environment:
- WAIT_HOSTS=db:1433,redis:6379,rabbitmq:15672,events:80
- WAIT_AFTER=90
- WAIT_TIMEOUT=300

events:
image: "resgridllc/resgridwebevents:0.5.19"
image: "resgridllc/resgridwebevents:0.5.23"
ports:
- "5153:80"
env_file:
Expand All @@ -46,10 +46,11 @@ services:
- rabbitmq
environment:
- WAIT_HOSTS=db:1433,redis:6379,rabbitmq:15672
- WAIT_AFTER=90
- WAIT_AFTER=120
- WAIT_TIMEOUT=300

worker:
image: "resgridllc/resgridworkersconsole:0.5.19"
image: "resgridllc/resgridworkersconsole:0.5.23"
env_file:
- resgrid.env
depends_on:
Expand All @@ -58,22 +59,27 @@ services:
- rabbitmq
environment:
- WAIT_HOSTS=db:1433,redis:6379,rabbitmq:15672
- WAIT_AFTER=90
- WAIT_TIMEOUT=180

db:
image: "mcr.microsoft.com/mssql/server:2019-CU13-ubuntu-20.04"
ports:
- "5157:1433"
build:
context: .
dockerfile: ./db/Dockerfile
build: ./db
environment:
- SA_PASSWORD=Resgrid123!!
- ACCEPT_EULA=Y
- MSSQL_PID=Express
volumes:
- ./docker-data/sql/data/:/var/opt/mssql/data
- ./docker-data/sql/log/:/var/opt/mssql/log
- ./docker-data/sql/backup/:/var/opt/mssql/backup
- type: bind
source: ./docker-data/sql/data
target: /var/opt/mssql/data
- type: bind
source: ./docker-data/sql/log
target: /var/opt/mssql/log
- type: bind
source: ./docker-data/sql/backup
target: /var/opt/mssql/backup

redis:
image: "redis:alpine"
Expand All @@ -96,32 +102,3 @@ services:
- "5163:5601"
- "5164:9200"
- "5165:5044"

mailserver:
image: docker.io/mailserver/docker-mailserver:latest
container_name: mailserver
# If the FQDN for your mail-server is only two labels (eg: example.com),
# you can assign this entirely to `hostname` and remove `domainname`.
hostname: rgmail
domainname: yourcompany.com
env_file: mailserver.env
# More information about the mail-server ports:
# https://docker-mailserver.github.io/docker-mailserver/edge/config/security/understanding-the-ports/
# To avoid conflicts with yaml base-60 float, DO NOT remove the quotation marks.
ports:
- "25:25" # SMTP (explicit TLS => STARTTLS)
- "143:143" # IMAP4 (explicit TLS => STARTTLS)
- "465:465" # ESMTP (implicit TLS)
- "587:587" # ESMTP (explicit TLS => STARTTLS)
- "993:993" # IMAP4 (implicit TLS)
volumes:
- ./docker-data/dms/mail-data/:/var/mail/
- ./docker-data/dms/mail-state/:/var/mail-state/
- ./docker-data/dms/mail-logs/:/var/log/mail/
- ./docker-data/dms/config/:/tmp/docker-mailserver/
- /etc/localtime:/etc/localtime:ro
restart: always
stop_grace_period: 1m
cap_add:
- NET_ADMIN
- SYS_PTRACE
Empty file modified Docker/docker-data/dms/config/mailconfig
100644 → 100755
Empty file.
Empty file modified Docker/docker-data/dms/mail-data/maildata
100644 → 100755
Empty file.
Empty file modified Docker/docker-data/dms/mail-logs/maillogs
100644 → 100755
Empty file.
Empty file modified Docker/docker-data/dms/mail-state/mailstate
100644 → 100755
Empty file.
Empty file modified Docker/docker-data/sql/backup/sqlbackups
100644 → 100755
Empty file.
Empty file modified Docker/docker-data/sql/data/sqldata
100644 → 100755
Empty file.
Empty file modified Docker/docker-data/sql/log/sqllogs
100644 → 100755
Empty file.
6 changes: 3 additions & 3 deletions Docker/resgrid.env
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ RESGRID__OidcConfig__SigningCert=MIIJagIBAzCCCSYGCSqGSIb3DQEHAaCCCRcEggkTMIIJDzC
# -----------------------------------------------

RESGRID__OutboundEmailServerConfig__EnableSsl=false
RESGRID__OutboundEmailServerConfig__FromMail=resgrid@yourcompany.com
RESGRID__OutboundEmailServerConfig__FromMail=resgrid@yourcompany.local
RESGRID__OutboundEmailServerConfig__Host=mailserver
RESGRID__OutboundEmailServerConfig__Password=
RESGRID__OutboundEmailServerConfig__Port=25
Expand All @@ -69,11 +69,11 @@ RESGRID__SystemBehaviorConfig__ResgridEventingBaseUrl=http://events:80
RESGRID__SystemBehaviorConfig__Environment=3
RESGRID__SystemBehaviorConfig__ErrorLoggerType=0
RESGRID__SystemBehaviorConfig__OutboundEmailType=1
RESGRID__DODBUPGRADE=true

# -----------------------------------------------
# --- Worker Config Section ---------------------
# -----------------------------------------------

RESGRID__WorkerConfig__WorkerDbConnectionString=Data Source=db;Initial Catalog=ResgridWorkers;User Id=sa;Password=Resgrid123!!;MultipleActiveResultSets=True;
RESGRID__WorkerConfig__WorkerDbConnectionString=YDm8wWFm4jVZADvDuaM7xmnCsLnydRrwJL3sxNZchL4nU4mkCgUu3fy87yaKBnPSe8g78qvMvTs3ySWutevavt3QbV7M9vdM
RESGRID__WorkerConfig__PayloadKey=YDm8wWFm4jVZADvDuaM7xmnCsLnydRrwJL3sxNZchL4nU4mkCgUu3fy87yaKBnPSe8g78qvMvTs3ySWutevavt3QbV7M9vdM
RESGRID__DODBUPGRADE=true
2 changes: 2 additions & 0 deletions Docker/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
sysctl -w vm.max_map_count=262144
docker-compose --project-name resgird up

0 comments on commit cbf7ebb

Please sign in to comment.