mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
159 lines
4.4 KiB
YAML
159 lines
4.4 KiB
YAML
# This file defines the production settings. It is overwritten by docker-compose.override.yml,
|
|
# which defines the development settings. The override.yml is loaded by default. Therefore it
|
|
# is required to explicitly define if you want an production build:
|
|
# > docker-compose -f docker-compose.yml up
|
|
|
|
version: "3.4"
|
|
|
|
services:
|
|
########################################################
|
|
# FRONTEND #############################################
|
|
########################################################
|
|
frontend:
|
|
image: gradido/frontend:latest
|
|
build:
|
|
context: ./frontend
|
|
target: production
|
|
networks:
|
|
- internal-net
|
|
ports:
|
|
- 3000:3000
|
|
environment:
|
|
# Envs used in Dockerfile
|
|
# - DOCKER_WORKDIR="/app"
|
|
# - PORT=3000
|
|
- BUILD_DATE
|
|
- BUILD_VERSION
|
|
- BUILD_COMMIT
|
|
- NODE_ENV="production"
|
|
# Application only envs
|
|
#- HOST=0.0.0.0 # This is nuxt specific, alternative value is HOST=webapp
|
|
#env_file:
|
|
# - ./frontend/.env
|
|
|
|
#########################################################
|
|
## MARIADB ##############################################
|
|
#########################################################
|
|
mariadb:
|
|
build:
|
|
context: .
|
|
dockerfile: ./mariadb/Dockerfile
|
|
target: mariadb_server_test
|
|
environment:
|
|
- MARIADB_ALLOW_EMPTY_PASSWORD=1
|
|
- MARIADB_USER=root
|
|
networks:
|
|
- internal-net
|
|
ports:
|
|
- 3306:3306
|
|
volumes:
|
|
- db_vol:/var/lib/mysql
|
|
|
|
########################################################
|
|
# BACKEND ##############################################
|
|
########################################################
|
|
backend:
|
|
image: gradido/backend:latest
|
|
build:
|
|
context: ./backend
|
|
target: production
|
|
networks:
|
|
- internal-net
|
|
ports:
|
|
- 4000:4000
|
|
environment:
|
|
# Envs used in Dockerfile
|
|
# - DOCKER_WORKDIR="/app"
|
|
# - PORT=4000
|
|
- BUILD_DATE
|
|
- BUILD_VERSION
|
|
- BUILD_COMMIT
|
|
- NODE_ENV="production"
|
|
# Application only envs
|
|
#env_file:
|
|
# - ./frontend/.env
|
|
|
|
#########################################################
|
|
## LOGIN SERVER #########################################
|
|
#########################################################
|
|
login-server:
|
|
build:
|
|
context: ./login_server/
|
|
depends_on:
|
|
- mariadb
|
|
networks:
|
|
- internal-net
|
|
ports:
|
|
- 1200:1200
|
|
- 1201:1201
|
|
volumes:
|
|
- ./configs/login_server:/etc/grd_login
|
|
|
|
#########################################################
|
|
## NGINX ################################################
|
|
#########################################################
|
|
## nginx, connect login-server and community-server together (and php-fpm to community-server)
|
|
nginx:
|
|
build:
|
|
context: .
|
|
dockerfile: ./nginx/Dockerfile
|
|
networks:
|
|
- external-net
|
|
- internal-net
|
|
depends_on:
|
|
- community-server
|
|
- login-server
|
|
- frontend
|
|
ports:
|
|
- 80:80
|
|
|
|
#########################################################
|
|
## COMMUNITY SERVER (cakephp with php-fpm) ##############
|
|
#########################################################
|
|
community-server:
|
|
build:
|
|
context: .
|
|
target: community_server
|
|
dockerfile: ./community_server/Dockerfile
|
|
environment:
|
|
- DB_PASSWORD=''
|
|
- DB_USER='root'
|
|
- DB_DATABASE='gradido_community'
|
|
depends_on:
|
|
- mariadb
|
|
networks:
|
|
- internal-net
|
|
volumes:
|
|
- ./community_server/config/php-fpm/php-ini-overrides.ini:/etc/php/7.4/fpm/conf.d/99-overrides.ini
|
|
|
|
#########################################################
|
|
## GRADIDO NODE v1 ######################################
|
|
#########################################################
|
|
# gradido-node:
|
|
# build:
|
|
# context: .
|
|
# dockerfile: ./gn/docker/deprecated-hedera-node/Dockerfile
|
|
# volumes:
|
|
# - ${GN_INSTANCE_FOLDER}:/opt/instance
|
|
# container_name: ${GN_CONTAINER_NAME}
|
|
|
|
#########################################################
|
|
## GRADIDO NODE test ###################################
|
|
#########################################################
|
|
# gradido-node-test:
|
|
# build:
|
|
# context: .
|
|
# dockerfile: ./gn/docker/deprecated-hedera-node/Dockerfile
|
|
# container_name: gn-test
|
|
# working_dir: /opt/gn/build
|
|
# command: ["./unit_tests"]
|
|
|
|
networks:
|
|
external-net:
|
|
internal-net:
|
|
internal: true
|
|
|
|
volumes:
|
|
db_vol:
|
|
|