#294 Docker support for local development

已关闭
senooken 请求将 3 次代码提交从 senooken/docker-support 合并至 diogo/master
senooken 评论于 2 年之前

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 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`.
someonewithpc 评论于 2 年之前
协作者

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 named docker/development, in my opinion

  • Here 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

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
senooken 评论于 2 年之前
发布者

@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.
someonewithpc 评论于 2 年之前
协作者

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
senooken 评论于 2 年之前
发布者

OK. In this time, I did not rebase to make the difference clearer for your check. I rebased on #293 after review.

OK. In this time, I did not rebase to make the difference clearer for your check. I rebased on #293 after review.
someonewithpc 评论于 2 年之前
协作者

Sorry for the delay

Commited in c378019deb

Sorry for the delay Commited in https://notabug.org/diogo/gnu-social/commit/c378019deb06a03f75c55d5edd7042b51e7f24b1
请重新开启合并请求来完成合并操作。
登录 并参与到对话中。
未选择里程碑
未指派成员
2 名参与者
正在加载...
取消
保存
这个人很懒,什么都没留下。