services: build: env_file: - .env container_name: ${APP_CONTAINER_NAME} build: context: . dockerfile: gemp_app.Dockerfile image: gemp_app expose: - "80" - "8080" restart: always ports: # target means in the container - target: 80 # published is what's on the host machine published: "${APP_PORT}" #These are the ports used for remote debugging the JRE - target: 8000 published: 8052 volumes: - type: bind source: ../gemp-lotr-async/src/main/web target: /etc/gemp-lotr/web consistency: consistent - type: bind source: ../../gemp-lotr target: /etc/gemp-lotr consistency: consistent - type: bind source: ../../logs target: /logs consistency: consistent - type: bind source: ../../replay target: /etc/gemp-lotr/replay consistency: consistent - type: bind source: ../../logs/nohup.out target: /etc/gemp-lotr/nohup.out consistency: consistent networks: gemp_net_1: ipv4_address: ${APP_IP} tty: true command: nohup java -jar -Dlog4j2.contextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector /etc/gemp-lotr/gemp-lotr-async/target/web.jar &> /logs/nohup.out & db: env_file: - .env container_name: ${DB_CONTAINER_NAME} build: context: .. dockerfile: docker/gemp_db.Dockerfile image: gemp_db ports: # target means in the container - target: 3306 # published is what's on the host machine published: "${DB_PORT}" restart: always volumes: - type: bind source: ../../database target: /var/lib/mysql networks: gemp_net_1: ipv4_address: ${DB_IP} networks: gemp_net_1: ipam: driver: default config: - subnet: 172.28.${SERVID}.0/24 attachable: true