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

@ -18,53 +18,32 @@ services:
- frontend_node_modules:/app/node_modules
# bind the local folder to the docker to allow live reload
- ./frontend:/app
########################################################
# BACKEND ##############################################
########################################################
## login server
#########################################################
## LOGIN SERVER #########################################
#########################################################
login-server:
build:
context: ./login_server/
build:
target: login_server_debug
dockerfile: Dockerfile.debug
container_name: login-server
security_opt:
- seccomp:unconfined
cap_add:
- SYS_PTRACE
depends_on:
- mariadb
networks:
- internal-net
ports:
- 1200:1200
- 1201:1201
volumes:
- ./configs/login_server:/etc/grd_login
- ./logs:/var/log/grd_login
- conan:/root/.conan
## community server (cakephp with php-fpm and 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:
- ./logs:/var/log/nginx
## for debugging mariadb
#########################################################
## PHPMYADMIN ###########################################
#########################################################
phpmyadmin:
image: phpmyadmin
container_name: phpmyadmin
@ -78,22 +57,7 @@ services:
- external-net
volumes:
- /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:
frontend_node_modules:
conan:
# backend_node_modules:
conan:

View File

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