-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
42 lines (40 loc) · 1.12 KB
/
docker-compose.yml
File metadata and controls
42 lines (40 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
services:
mysql:
image: mysql:8.0
container_name: letras_mysql
restart: unless-stopped
environment:
MYSQL_DATABASE: letrasypapeles_db
MYSQL_USER: myuser
MYSQL_PASSWORD: password
MYSQL_ROOT_PASSWORD: rootpass
ports:
- "3306:3306"
volumes:
- mysql_data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
interval: 10s
retries: 5
start_period: 20s
backend:
build:
context: .
dockerfile: Dockerfile
container_name: letras_backend
restart: unless-stopped
depends_on:
mysql:
condition: service_healthy
environment:
SPRING_PROFILES_ACTIVE: dev
SPRING_DATASOURCE_URL: jdbc:mysql://letras_mysql:3306/letrasypapeles_db?allowPublicKeyRetrieval=true&useSSL=false&serverTimezone=UTC
SPRING_DATASOURCE_USERNAME: myuser
SPRING_DATASOURCE_PASSWORD: password
JWT_SECRET: 'Ay9v#eLP2Pu4zS6m8LqGvB$K7tPc@hWs3rZeX1q%U2dN5jY9x4BwCcR0SaMfHg8'
SERVER_PORT: 8080
ports:
- "8080:8080"
command: ["java","-jar","/app/app.jar"]
volumes:
mysql_data: