Merge branch 'master' into card-dev
This commit is contained in:
15
gemp-lotr/docker/.env
Normal file
15
gemp-lotr/docker/.env
Normal file
@@ -0,0 +1,15 @@
|
||||
SERVID=1
|
||||
COMPOSE_PROJECT_NAME=gemp_${SERVID}
|
||||
|
||||
APP_CONTAINER_NAME=gemp_app_${SERVID}
|
||||
APP_IP=172.28.${SERVID}.2
|
||||
APP_PORT=17001
|
||||
|
||||
DB_CONTAINER_NAME=gemp_db_${SERVID}
|
||||
DB_IP=172.28.${SERVID}.3
|
||||
DB_PORT=35001
|
||||
|
||||
MYSQL_ROOT_PASSWORD=rootpass
|
||||
MYSQL_DATABASE=gemp_db
|
||||
MYSQL_USER=gempuser
|
||||
MYSQL_PASSWORD=gemppassword
|
||||
@@ -1,10 +1,11 @@
|
||||
version: "3.4"
|
||||
|
||||
services:
|
||||
|
||||
|
||||
|
||||
build:
|
||||
container_name: gemp_app_1
|
||||
env_file:
|
||||
- .env
|
||||
container_name: ${APP_CONTAINER_NAME}
|
||||
build:
|
||||
context: .
|
||||
dockerfile: gemp_app.Dockerfile
|
||||
@@ -17,7 +18,7 @@ services:
|
||||
# target means in the container
|
||||
- target: 80
|
||||
# published is what's on the host machine
|
||||
published: 17001
|
||||
published: "${APP_PORT}"
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ../gemp-lotr-async/src/main/web
|
||||
@@ -29,14 +30,16 @@ services:
|
||||
source: ../gemp-lotr-async/src/main/web
|
||||
target: /var/www/localhost/htdocs/gemp-lotr #/etc/apache2/htdocs/gemp-lotr
|
||||
networks:
|
||||
gemp_net_1:
|
||||
ipv4_address: 172.28.1.2
|
||||
gemp_net:
|
||||
ipv4_address: ${APP_IP}
|
||||
tty: true
|
||||
#command: nohup java -jar /etc/gemp-lotr/gemp-lotr-async/target/web.jar &
|
||||
|
||||
|
||||
db:
|
||||
container_name: gemp_db_1
|
||||
env_file:
|
||||
- .env
|
||||
container_name: ${DB_CONTAINER_NAME}
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: docker/gemp_db.Dockerfile
|
||||
@@ -45,25 +48,20 @@ services:
|
||||
# target means in the container
|
||||
- target: 3306
|
||||
# published is what's on the host machine
|
||||
published: 35001
|
||||
published: "${DB_PORT}"
|
||||
restart: always
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ../../database
|
||||
target: /var/lib/mysql
|
||||
networks:
|
||||
gemp_net_1:
|
||||
ipv4_address: 172.28.1.3
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: rootpass
|
||||
MYSQL_DATABASE: gemp_db
|
||||
MYSQL_USER: gempuser
|
||||
MYSQL_PASSWORD: gemppassword
|
||||
gemp_net:
|
||||
ipv4_address: ${DB_IP}
|
||||
|
||||
|
||||
networks:
|
||||
gemp_net_1:
|
||||
gemp_net:
|
||||
ipam:
|
||||
driver: default
|
||||
config:
|
||||
- subnet: 172.28.1.0/16
|
||||
- subnet: 172.28.0.0/16
|
||||
Reference in New Issue
Block a user