oneuptime/docker-compose.dev.yml
2022-10-19 15:32:10 +01:00

358 lines
11 KiB
YAML

# This docker file is for development.
# It connects to debugging ports that help you debug the app.
version: '3.7'
x-common-variables: &common-variables
IS_SAAS_SERVICE: ${IS_SAAS_SERVICE}
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'
build:
network: host
context: ./Haraka
args:
PORT: '2525'
env_file:
- ./Haraka/.env
postgres:
image: postgres:latest
restart: always
env_file:
- ./Postgres/.env
ports:
- '5400:5432'
volumes:
- postgres:/var/lib/postgresql/data
mail:
ports:
- 9110:9229 # Debugging port.
- 3190:3190
build:
network: host
context: .
dockerfile: ./Mail/Dockerfile.dev
env_file:
- ./Common/.env
- ./CommonServer/.env
- ./Mail/.env
environment: *common-variables
depends_on:
- haraka
- postgres
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/
saml:
image: kenchan0130/simplesamlphp
ports:
- 9876:8080
- 8443:8443
env_file:
- ./Common/.env
- ./CommonServer/.env
- ./SAML/.env
volumes:
- ./SAML/users.php:/var/www/simplesamlphp/config/authsources.php
redis:
image: redis:7.0.3
ports:
- '6379:6379'
command: redis-server /usr/local/etc/redis/redis.conf
env_file:
- ./Redis/.env
volumes:
- ./Redis/redis.conf:/usr/local/etc/redis/redis.conf
accounts:
ports:
- '3003:3003'
build:
network: host
context: .
dockerfile: ./Accounts/Dockerfile.dev
env_file:
- ./Common/.env
- ./CommonUI/.env
- ./Accounts/.env
environment: *common-variables
depends_on:
- identity
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/
dashboard:
ports:
- '3009:3009'
build:
network: host
context: .
dockerfile: ./Dashboard/Dockerfile.dev
env_file:
- ./Common/.env
- ./CommonUI/.env
- ./Accounts/.env
environment: *common-variables
depends_on:
- identity
- accounts
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/
status-page:
ports:
- '3105:3105'
build:
network: host
context: .
dockerfile: ./StatusPage/Dockerfile.dev
env_file:
- ./Common/.env
- ./CommonUI/.env
- ./StatusPage/.env
environment: *common-variables
depends_on:
- accounts
- dashboard-api
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/
dashboard-api:
ports:
- '3002:3002'
- '9232:9229' # Debugging port.
build:
network: host
context: .
dockerfile: ./DashboardAPI/Dockerfile.dev
env_file:
- ./Common/.env
- ./CommonServer/.env
- ./DashboardAPI/.env
environment: *common-variables
depends_on:
- redis
- postgres
- mail
links:
- redis
- postgres
- mail
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
- /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/
workers:
ports:
- '3452:3452'
- '9654:9229' # Debugging port.
build:
network: host
context: .
dockerfile: ./Workers/Dockerfile.dev
env_file:
- ./Common/.env
- ./CommonServer/.env
- ./Workers/.env
environment: *common-variables
depends_on:
- redis
- postgres
- mail
links:
- redis
- postgres
- mail
volumes:
- ./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/
identity:
ports:
- '3087:3087'
- '9132:9229' # Debugging port.
build:
network: host
context: .
dockerfile: ./Identity/Dockerfile.dev
env_file:
- ./Common/.env
- ./CommonServer/.env
- ./Identity/.env
environment: *common-variables
depends_on:
- redis
- postgres
- mail
links:
- redis
- postgres
- mail
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/
file:
ports:
- '3125:3125'
- '9012:9229' # Debugging port.
build:
network: host
context: .
dockerfile: ./File/Dockerfile.dev
env_file:
- ./Common/.env
- ./CommonServer/.env
- ./File/.env
environment: *common-variables
depends_on:
- postgres
links:
- postgres
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/
home:
ports:
- '1444:1444'
- '9235:9229' # Debugging port.
env_file:
- ./Common/.env
- ./CommonServer/.env
- ./Home/.env
environment: *common-variables
build:
network: host
context: .
dockerfile: ./Home/Dockerfile.dev
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/
nginx:
depends_on:
- identity
- accounts
- dashboard-api
- dashboard
- home
restart: always
build:
dockerfile: Dockerfile
network: host
context: ./Nginx
ports:
- '80:80'
- '443:443'
volumes:
postgres: