server: add persistent storage for mariadb
This commit is contained in:
@ -1,6 +1,13 @@
|
|||||||
# FE_Charts
|
# 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.
|
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
|
## Setup the app
|
||||||
|
|
||||||
- Change the variables in the `database.php` file to match the server.
|
- Change the variables in the `database.php` file to match the server.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
services:
|
services:
|
||||||
db:
|
mariadb:
|
||||||
image: docker.io/library/mariadb:11.5.2
|
image: docker.io/library/mariadb:11.5.2
|
||||||
container_name: ${MYSQL_HOST}
|
container_name: ${MYSQL_HOST}
|
||||||
restart: always
|
restart: always
|
||||||
@ -10,12 +10,14 @@ services:
|
|||||||
MYSQL_DATABASE: ${MYSQL_DATABASE}
|
MYSQL_DATABASE: ${MYSQL_DATABASE}
|
||||||
MYSQL_USER: ${MYSQL_USER}
|
MYSQL_USER: ${MYSQL_USER}
|
||||||
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
|
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
|
||||||
|
volumes:
|
||||||
|
- ~/volumes/fecharts:/var/lib/mysql
|
||||||
|
|
||||||
phpmyadmin:
|
phpmyadmin:
|
||||||
image: docker.io/library/phpmyadmin
|
image: docker.io/library/phpmyadmin:5.2.1
|
||||||
container_name: fecharts_phpmyadmin
|
container_name: fecharts_phpmyadmin
|
||||||
links:
|
links:
|
||||||
- ${MYSQL_HOST}
|
- mariadb
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- 127.0.0.1:${PHPMYADMIN_PORT}:80
|
- 127.0.0.1:${PHPMYADMIN_PORT}:80
|
||||||
@ -28,7 +30,7 @@ services:
|
|||||||
image: odari/fecharts_api:1.0.0
|
image: odari/fecharts_api:1.0.0
|
||||||
container_name: fecharts_api
|
container_name: fecharts_api
|
||||||
links:
|
links:
|
||||||
- ${MYSQL_HOST}
|
- mariadb
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- 127.0.0.1:${FECHARTS_API_PORT}:80
|
- 127.0.0.1:${FECHARTS_API_PORT}:80
|
||||||
|
Reference in New Issue
Block a user