thybag / RPGCampaignManager

An Opensource RPG Campaign Manager and World Building tool.
3 stars 7 forks source link

Docker for local development #13

Open Spiker1992 opened 3 years ago

Spiker1992 commented 3 years ago

Added a docker env for local development.

To spin up you need to take the following steps:

  1. go into $docker/
  2. run cp .env.example .env
  3. run docker-compose up -d --build
  4. make sure to add campaign-manager.local to your hosts file

e.g. for Windows:

127.0.0.1 campaign-manager.local
::1 campaign-manager.local

Settings

$docker/.env.example

To make changes to default ports & storage locations you'd need to make changes to the .env file.

$.env.example

Laravel's .env.example was updated with default settings for MySQL, Redis and local storage.

Spiker1992 commented 3 years ago

@thybag not sure on how to link this PR with the relevant issue, I work with BitBucket on a day-to-day, so pretty clueless :)

Let me know if there are any issues, but I think PHP extension wise we should be covered.

Also, this PR is more for local dev, not so much for server setup, but should be ok to run on a single server due to persistent storage. I tend to have a separate repo for docker containers to spin up on a server.

thybag commented 3 years ago

Hi Spiker1992, cheers for the PR. No worries re: linking to the ticket.

My original thought was more along the lines of a deployable all in one for self hosting, rather than a dev version (ie. everything compiled and good to go so a self hoster can just run something along the lines of docker create --name=rpg -v /bla/files:/var/www/uploads -v /bla/db:/var/database -p 80:80 thybag/rpgcampaignmanager style command and have a fully setup copy good to go.)

Will have a think about how best to fit this in. Short term have added the hacktoberfest tag, so assuming your participating it'll count for that.

thybag commented 3 years ago

@Spiker1992 Just to flag last commit ^^ suspect probably makes sense for tests & other bits to be their own branch/PR so as not to mix concerns to much. Hopefully not to much of a pain to force push this branch back to prev head & cherry pick your other changes out.

Spiker1992 commented 3 years ago

@thybag I've just realised that my last commit mixed things up :D I will add separate branches on my fork tomorrow.

Thanks for tagging it, yes I am participating, I am after that t-shirt :)

Spiker1992 commented 3 years ago

@thybag should be ok now. I also resolved the merge conflict.