server: add persistent storage for mariadb

This commit is contained in:
dario-cfpt
2024-10-02 17:05:44 +02:00
parent 068158ede9
commit f420a6232a
2 changed files with 13 additions and 4 deletions

View File

@ -1,6 +1,13 @@
# FE_Charts
Fire Emblem Charts is a mobile application that allows you to view the statistics of the characters in the game Fire Emblem Three Houses in the form of graphics.
## Build the app
```bash
docker build -t odari/fecharts_api:1.0.0 .
docker compose up -d
```
## Setup the app
- Change the variables in the `database.php` file to match the server.

View File

@ -1,5 +1,5 @@
services:
db:
mariadb:
image: docker.io/library/mariadb:11.5.2
container_name: ${MYSQL_HOST}
restart: always
@ -10,12 +10,14 @@ services:
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
volumes:
- ~/volumes/fecharts:/var/lib/mysql
phpmyadmin:
image: docker.io/library/phpmyadmin
image: docker.io/library/phpmyadmin:5.2.1
container_name: fecharts_phpmyadmin
links:
- ${MYSQL_HOST}
- mariadb
restart: unless-stopped
ports:
- 127.0.0.1:${PHPMYADMIN_PORT}:80
@ -28,7 +30,7 @@ services:
image: odari/fecharts_api:1.0.0
container_name: fecharts_api
links:
- ${MYSQL_HOST}
- mariadb
restart: always
ports:
- 127.0.0.1:${FECHARTS_API_PORT}:80