I created Docker support PR on v2 for bug reproducing, standardization/normalization of development environment.
I checked #293/ #254 on this docker image.
In [#293 comment](https://notabug.org/diogo/gnu-social/pulls/293#issuecomment-33609), @someonewithpc prepare docker support for v3.
But I think v2 not yet, and it looks like complex. So I created this PR for our development.
To consider [someonewithpc's directory structure](https://notabug.org/someonewithpc/gnu-social/src/nightly/docker), I put files to `docker/localhost`.
This PR looks good, apart from the small issues below. However, we were mostly using nginx and postgres, while this PR uses Apache and MariaDB, which might allow us to spot any differences.
The database doesn't persist if the container is stopped. I think it would be helpful to add an explicit volume
MariaDB ports don't need to be mapped to outside the container, but it's useful for using external tools to visualize or manage the DB. It should use the standard port for this, though, not 13306
The directory docker/localhost should be named docker/development, in my opinion
HereROOT is set but not used, so there's no point in including it in the instructions
docker-compose is replaced with docker compose on new systems
docker-compose build is redundant, docker-compose up builds if necessary
I said docker support wasn't merged, but it was ready in https://notabug.org/someonewithpc/gnu-social/src/docker (needs a rebase with the main repo's nightly)
This PR looks good, apart from the small issues below. However, we were mostly using nginx and postgres, while this PR uses Apache and MariaDB, which might allow us to spot any differences.
Issues:
- There's a typo [here](https://notabug.org/diogo/gnu-social/pulls/294/files#diff-b1d63a1fcfb303b193447eafcae02391121bb97R10)
- The database doesn't persist if the container is stopped. I think it would be helpful to add an explicit volume
- MariaDB ports don't need to be mapped to outside the container, but it's useful for using external tools to visualize or manage the DB. It should use the standard port for this, though, not `13306`
- The directory `docker/localhost` should be named `docker/development`, in my opinion
- [Here](https://notabug.org/diogo/gnu-social/pulls/294/files#diff-b1d63a1fcfb303b193447eafcae02391121bb97R8) `ROOT` is set but not used, so there's no point in including it in the instructions
- `docker-compose` is replaced with `docker compose` on new systems
- `docker-compose build` is redundant, `docker-compose up` builds if necessary
@someonewithpc Thanks for review. I fixed review. When you merge, please use squashed merge because intermediate commit is no meaning for master.
However, we were mostly using nginx and postgres, while this PR uses Apache and MariaDB,
I think either is OK. You may fix to nginx/postgres later.
I am familiar with LAMP (Apache/MariaDB) than nginx/postgres. And docker-hub have official php-apache image, so I used apache for simple. There is no php-nginx image. And GNU social supports MariaDB mainly originally (https://notabug.org/diogo/gnu-social/src/master/INSTALL.md).
And I think Apache/MariaDB is more than nginx/postgres on web shared hosting. In Japan, there is no available nginx for all web shared hosting as long as I know.
These are my reason.
@someonewithpc Thanks for review. I fixed review. When you merge, please use squashed merge because intermediate commit is no meaning for master.
> However, we were mostly using nginx and postgres, while this PR uses Apache and MariaDB,
I think either is OK. You may fix to nginx/postgres later.
I am familiar with LAMP (Apache/MariaDB) than nginx/postgres. And docker-hub have official php-apache image, so I used apache for simple. There is no php-nginx image. And GNU social supports MariaDB mainly originally (<https://notabug.org/diogo/gnu-social/src/master/INSTALL.md>).
And I think Apache/MariaDB is more than nginx/postgres on web shared hosting. In Japan, there is no available nginx for all web shared hosting as long as I know.
These are my reason.
I don't think the notabug UI allows me to squash commits, so I'll close the PR and merge to nightly (development branch)
BTW, we normally rebase, don't be afraid to rewrite history, especially in PRs
I don't think the notabug UI allows me to squash commits, so I'll close the PR and merge to nightly (development branch)
BTW, we normally rebase, don't be afraid to rewrite history, especially in PRs
I created Docker support PR on v2 for bug reproducing, standardization/normalization of development environment.
I checked #293/ #254 on this docker image.
In #293 comment, @someonewithpc prepare docker support for v3.
But I think v2 not yet, and it looks like complex. So I created this PR for our development.
To consider someonewithpc's directory structure, I put files to
docker/localhost
.I said docker support wasn't merged, but it was ready in https://notabug.org/someonewithpc/gnu-social/src/docker (needs a rebase with the main repo's nightly)
This PR looks good, apart from the small issues below. However, we were mostly using nginx and postgres, while this PR uses Apache and MariaDB, which might allow us to spot any differences.
Issues:
There's a typo here
The database doesn't persist if the container is stopped. I think it would be helpful to add an explicit volume
MariaDB ports don't need to be mapped to outside the container, but it's useful for using external tools to visualize or manage the DB. It should use the standard port for this, though, not
13306
The directory
docker/localhost
should be nameddocker/development
, in my opinionHere
ROOT
is set but not used, so there's no point in including it in the instructionsdocker-compose
is replaced withdocker compose
on new systemsdocker-compose build
is redundant,docker-compose up
builds if necessary@someonewithpc Thanks for review. I fixed review. When you merge, please use squashed merge because intermediate commit is no meaning for master.
I think either is OK. You may fix to nginx/postgres later.
I am familiar with LAMP (Apache/MariaDB) than nginx/postgres. And docker-hub have official php-apache image, so I used apache for simple. There is no php-nginx image. And GNU social supports MariaDB mainly originally (https://notabug.org/diogo/gnu-social/src/master/INSTALL.md).
And I think Apache/MariaDB is more than nginx/postgres on web shared hosting. In Japan, there is no available nginx for all web shared hosting as long as I know.
These are my reason.
I don't think the notabug UI allows me to squash commits, so I'll close the PR and merge to nightly (development branch)
BTW, we normally rebase, don't be afraid to rewrite history, especially in PRs
OK. In this time, I did not rebase to make the difference clearer for your check. I rebased on #293 after review.
Sorry for the delay
Commited in
c378019deb