Skip to content

Commit

Permalink
fix dev env
Browse files Browse the repository at this point in the history
  • Loading branch information
5ym committed Jul 30, 2023
1 parent 9bcc97b commit 3277a77
Show file tree
Hide file tree
Showing 40 changed files with 41 additions and 123 deletions.
21 changes: 21 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"dockerComposeFile": ["../docker-compose.yml"],
"service": "web",
"workspaceFolder": "/var/lib/nginx/html/app/Plugin/UnivaPay",
"customizations": {
"vscode": {
"settings": {
"php.validate.enable": false,
"php.suggest.basic": false,
"[php]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "bmewburn.vscode-intelephense-client"
}
},
"extensions": [
"bmewburn.vscode-intelephense-client",
"ms-azuretools.vscode-docker"
]
}
}
}
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
- name: Build
run: cd UnivaPay && tar -cvzf UnivaPay.tar.gz *
run: tar -cvzf UnivaPay.tar.gz *
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
Expand Down
Empty file modified .gitignore
100644 → 100755
Empty file.
8 changes: 0 additions & 8 deletions .idea/.gitignore

This file was deleted.

9 changes: 0 additions & 9 deletions .idea/UnivaPay-for-EC-CUBE4.iml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/misc.xml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules.xml

This file was deleted.

66 changes: 0 additions & 66 deletions .idea/php.xml

This file was deleted.

10 changes: 0 additions & 10 deletions .idea/remote-mappings.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM ghcr.io/5ym/ec-cube:4.1
RUN apk add git openssh-client
COPY . /var/lib/nginx/html/app/Plugin/UnivaPay
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,28 @@ UnivaPayの申し込み方法

## 開発環境

vscode devcontainerを利用しています。

```sh
git clone https://github.com/univapaycast/UnivaPay-for-EC-CUBE4.git
git clone https://github.com/univapay/UnivaPay-for-EC-CUBE4.git
cd UnivaPay-for-EC-CUBE4
cp docker-compose.sample.yml docker-compose.yml
docker compose up -d
docker compose exec web sh -c "bin/console eccube:install -n"
docker compose exec web sh -c "bin/console eccube:composer:require univapay/php-sdk"
docker compose exec web sh -c "bin/console eccube:plugin:install --code=UnivaPay && bin/console eccube:plugin:enable --code=UnivaPay && bin/console cache:clear"
code . # devcontainerで開かなかったらdevcontainerで開きなおしてください
bin/console eccube:install -n
bin/console eccube:composer:require univapay/php-sdk
bin/console eccube:plugin:install --code=UnivaPay && bin/console eccube:plugin:enable --code=UnivaPay && bin/console cache:clear
```

<http://localhost:1080>

#### データベース更新したとき
### データベース更新したとき

```sh
docker compose exec web sh -c "bin/console eccube:install -n && bin/console eccube:plugin:install --code=UnivaPay && bin/console eccube:plugin:enable --code=UnivaPay"
bin/console eccube:install -n && bin/console eccube:plugin:install --code=UnivaPay && bin/console eccube:plugin:enable --code=UnivaPay
```

#### 管理者向けアップデート手順
### 管理者向けアップデート手順

1. composer.json内のversionを上げる
2. masterにコミット後github内でバージョンタグの作成
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 6 additions & 2 deletions docker-compose.sample.yml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3.9"

services:
web:
image: ghcr.io/5ym/ec-cube:4.1
build: .
ports:
- "1080:80"
environment:
Expand All @@ -19,10 +19,14 @@ services:
- ECCUBE_ADMIN_ROUTE=admin
- ECCUBE_TEMPLATE_CODE=default
- ECCUBE_LOCALE=ja
- SHELL=/bin/ash
volumes:
- "./UnivaPay:/var/lib/nginx/html/app/Plugin/UnivaPay"
- ".:/var/lib/nginx/html/app/Plugin/UnivaPay"
depends_on:
- db
dns:
- 1.1.1.1
- 1.0.0.1
db:
image: postgres:10
environment:
Expand Down

0 comments on commit 3277a77

Please sign in to comment.