Docker-Compose support for Windows (#3974)
* Add docker-compose document that works out of the box for Windows, and a storage location for the mysql-database. * Documented Windows support in Readme file
This commit is contained in:
parent
1988e4558f
commit
c69e77f330
3 changed files with 37 additions and 0 deletions
|
@ -155,6 +155,11 @@ docker-compose up # Setup and run both the MySQL server and Servatrice.
|
||||||
|
|
||||||
>Note: The first time running the docker-compose setup, the MySQL server will take a little time to run the initial setup scripts. Due to this, the Servatrice instance may fail the first few attempts to connect to the database. Servatrice is set to `restart: always` in the docker-compose.yml, which will allow it to continue attempting to start up. Once the MySQL scripts have completed, Servatrice should then connect automatically on the next attempt.
|
>Note: The first time running the docker-compose setup, the MySQL server will take a little time to run the initial setup scripts. Due to this, the Servatrice instance may fail the first few attempts to connect to the database. Servatrice is set to `restart: always` in the docker-compose.yml, which will allow it to continue attempting to start up. Once the MySQL scripts have completed, Servatrice should then connect automatically on the next attempt.
|
||||||
|
|
||||||
|
**Docker compose in Windows**
|
||||||
|
A out of box working docker-compose file has been added to help setup in Windows.
|
||||||
|
|
||||||
|
Docker in Windows requires additional steps in form of using Docker Desktop to allow resource sharing from the drive the volumes are mapped from, as well as potential workarounds needed to get file sharing working in Windows. This [StackOverflow discussion sheds some light on it](https://stackoverflow.com/questions/42203488/settings-to-windows-firewall-to-allow-docker-for-windows-to-share-drive)
|
||||||
|
|
||||||
# License [](https://github.com/Cockatrice/Cockatrice/blob/master/LICENSE)
|
# License [](https://github.com/Cockatrice/Cockatrice/blob/master/LICENSE)
|
||||||
|
|
||||||
Cockatrice is free software, licensed under the [GPLv2](https://github.com/Cockatrice/Cockatrice/blob/master/LICENSE).
|
Cockatrice is free software, licensed under the [GPLv2](https://github.com/Cockatrice/Cockatrice/blob/master/LICENSE).
|
||||||
|
|
28
docker-compose.yml.windows
Normal file
28
docker-compose.yml.windows
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
version: '3'
|
||||||
|
|
||||||
|
services:
|
||||||
|
mysql:
|
||||||
|
image: mysql
|
||||||
|
environment:
|
||||||
|
- MYSQL_ROOT_PASSWORD=root-password
|
||||||
|
- MYSQL_DATABASE=servatrice
|
||||||
|
- MYSQL_USER=servatrice
|
||||||
|
- MYSQL_PASSWORD=password
|
||||||
|
volumes:
|
||||||
|
- ./servatrice/servatrice.sql:/docker-entrypoint-initdb.d/servatrice.sql
|
||||||
|
- ./servatrice/mysql-storage:/var/lib/mysql
|
||||||
|
|
||||||
|
servatrice:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
image: servatrice
|
||||||
|
depends_on:
|
||||||
|
- mysql
|
||||||
|
ports:
|
||||||
|
- "4747:4747"
|
||||||
|
- "4748:4748"
|
||||||
|
entrypoint: "/bin/bash -c 'sleep 10; servatrice --config /tmp/servatrice.ini --log-to-console'"
|
||||||
|
restart: always
|
||||||
|
volumes:
|
||||||
|
- ./servatrice/docker/servatrice-docker.ini:/tmp/servatrice.ini
|
4
servatrice/mysql-storage/.gitignore
vendored
Normal file
4
servatrice/mysql-storage/.gitignore
vendored
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
# Ignore everything in this directory
|
||||||
|
*
|
||||||
|
# Except this file
|
||||||
|
!.gitignore
|
Loading…
Reference in a new issue