crusade-tracker/docker-compose.yml

42 lines
1.3 KiB
YAML
Raw Normal View History

2021-01-18 20:27:50 +00:00
version: '2'
services:
nginx:
restart: always
build:
context: .
dockerfile: nginx.dockerfile
image: registry.digitalocean.com/nerdfortress/crusadetracker_nginx
expose:
- '80'
- '443'
ports:
- '80:80'
- '443:443'
crusadetracker-app:
restart: always
container_name: crusadetracker
build:
context: .
dockerfile: crusadetracker.dockerfile
image: registry.digitalocean.com/nerdfortress/crusadetracker
environment:
- _JAVA_OPTIONS=-Xmx512m -Xms256m
- 'SPRING_PROFILES_ACTIVE=prod,swagger'
- MANAGEMENT_METRICS_EXPORT_PROMETHEUS_ENABLED=true
- 'SPRING_DATASOURCE_URL=jdbc:mysql://crusadetracker-mysql:3306/crusadetracker?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&serverTimezone=UTC&createDatabaseIfNotExist=true'
- JHIPSTER_SLEEP=30
crusadetracker-mysql:
image: 'mysql:8.0.20'
volumes:
- db-data:/var/lib/mysql
environment:
- MYSQL_USER=root
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
- MYSQL_DATABASE=crusadetracker
command: mysqld --lower_case_table_names=1 --skip-ssl --character_set_server=utf8mb4 --explicit_defaults_for_timestamp
networks:
app-network:
driver: bridge
volumes:
db-data: