cleaned up docker-compose files

This commit is contained in:
Ulf Gebhardt 2021-02-24 19:38:50 +01:00
parent 70d3a5391d
commit 21e30bf760
No known key found for this signature in database
GPG Key ID: 81308EFE29ABFEBD
2 changed files with 28 additions and 55 deletions

View File

@ -19,52 +19,31 @@ services:
# bind the local folder to the docker to allow live reload # bind the local folder to the docker to allow live reload
- ./frontend:/app - ./frontend:/app
#########################################################
## LOGIN SERVER #########################################
######################################################## #########################################################
# BACKEND ##############################################
########################################################
## login server
login-server: login-server:
build: build:
context: ./login_server/
target: login_server_debug target: login_server_debug
dockerfile: Dockerfile.debug dockerfile: Dockerfile.debug
container_name: login-server
security_opt: security_opt:
- seccomp:unconfined - seccomp:unconfined
cap_add: cap_add:
- SYS_PTRACE - SYS_PTRACE
depends_on:
- mariadb
networks:
- internal-net
ports:
- 1200:1200
- 1201:1201
volumes: volumes:
- ./configs/login_server:/etc/grd_login
- ./logs:/var/log/grd_login - ./logs:/var/log/grd_login
- conan:/root/.conan - conan:/root/.conan
## community server (cakephp with php-fpm and nginx) #########################################################
## NGINX ################################################
#########################################################
nginx: nginx:
build:
context: .
dockerfile: ./nginx/Dockerfile
container_name: nginx
networks:
- external-net
- internal-net
depends_on:
- community-server
- login-server
ports:
- 80:80
volumes: volumes:
- ./logs:/var/log/nginx - ./logs:/var/log/nginx
## for debugging mariadb #########################################################
## PHPMYADMIN ###########################################
#########################################################
phpmyadmin: phpmyadmin:
image: phpmyadmin image: phpmyadmin
container_name: phpmyadmin container_name: phpmyadmin
@ -79,21 +58,6 @@ services:
volumes: volumes:
- /sessions - /sessions
# image: ocelotsocialnetwork/backend:development
# build:
# target: development
# environment:
# - NODE_ENV="development"
# - DEBUG=true
# volumes:
# # This makes sure the docker container has its own node modules.
# # Therefore it is possible to have a different node version on the host machine
# - backend_node_modules:/app/node_modules
# # bind the local folder to the docker to allow live reload
# - ./backend:/app
volumes: volumes:
frontend_node_modules: frontend_node_modules:
conan: conan:
# backend_node_modules:

View File

@ -16,8 +16,8 @@ services:
target: production target: production
networks: networks:
- external-net - external-net
#depends_on: depends_on:
# - backend - nginx
ports: ports:
- 8080:8080 - 8080:8080
environment: environment:
@ -34,9 +34,8 @@ services:
# - ./frontend/.env # - ./frontend/.env
######################################################### #########################################################
## BACKEND ############################################## ## MARIADB ##############################################
######################################################### #########################################################
## mariadb
mariadb: mariadb:
build: build:
context: . context: .
@ -53,7 +52,9 @@ services:
volumes: volumes:
- db_vol:/var/lib/mysql - db_vol:/var/lib/mysql
## login server #########################################################
## LOGIN SERVER #########################################
#########################################################
login-server: login-server:
build: build:
context: ./login_server/ context: ./login_server/
@ -63,9 +64,15 @@ services:
- mariadb - mariadb
networks: networks:
- internal-net - internal-net
ports:
- 1200:1200
- 1201:1201
volumes: volumes:
- ./configs/login_server:/etc/grd_login - ./configs/login_server:/etc/grd_login
#########################################################
## NGINX ################################################
#########################################################
## nginx, connect login-server and community-server together (and php-fpm to community-server) ## nginx, connect login-server and community-server together (and php-fpm to community-server)
nginx: nginx:
build: build:
@ -81,7 +88,9 @@ services:
ports: ports:
- 80:80 - 80:80
## community server (cakephp with php-fpm) #########################################################
## COMMUNITY SERVER (cakephp with php-fpm) ##############
#########################################################
community-server: community-server:
build: build:
context: . context: .