Skip to content

Commit e7ed7d6

Browse files
build: create compose.yaml and add it to the .dockerignore
1 parent 4652b65 commit e7ed7d6

2 files changed

Lines changed: 43 additions & 0 deletions

File tree

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
compose.yaml

compose.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
services:
2+
web:
3+
image: vianavitor/slibrarygm-app:latest
4+
depends_on:
5+
database:
6+
condition: service_healthy
7+
ports:
8+
- "8080:8080"
9+
networks:
10+
- app-net
11+
volumes:
12+
- /home/shared/slibrarygm-books:/app/uploads
13+
environment:
14+
- DATABASE_URL=jdbc:mysql://database:3306/slibrarygm
15+
- DATABASE_USER=root
16+
- DATABASE_PASSWORD=123
17+
- BOOK_IMAGE_PATH=/app/uploads/books_cover
18+
19+
database:
20+
image: mysql:oraclelinux9
21+
environment:
22+
MYSQL_ROOT_PASSWORD: 123
23+
MYSQL_DATABASE: slibrarygm
24+
ports:
25+
- "3306:3306"
26+
healthcheck:
27+
test: [ "CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p123" ]
28+
interval: 10s
29+
timeout: 5s
30+
retries: 5
31+
start_period: 30s
32+
restart: always
33+
networks:
34+
- app-net
35+
volumes:
36+
- db-volume:/var/lib/mysql
37+
38+
networks:
39+
app-net:
40+
41+
volumes:
42+
db-volume:

0 commit comments

Comments
 (0)