Skip to content

Commit e7d7984

Browse files
authored
Merge pull request #5 from Ilyes512/updates
Realigned package with package skeleton
2 parents 896ca4d + 26c9d4e commit e7d7984

9 files changed

+89
-108
lines changed

.devcontainer/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ARG USER_GID=$USER_UID
88
ARG WORKSPACE_PATH=/workspace
99

1010
RUN groupadd --gid "$USER_GID" "$USERNAME" \
11-
&& useradd --uid "$USER_UID" --gid "$USER_GID" --create-home "$USERNAME" \
11+
&& useradd --uid "$USER_UID" --gid "$USER_GID" --create-home "$USERNAME" --shell /bin/bash \
1212
&& mkdir -p \
1313
"$WORKSPACE_PATH" \
1414
"/home/$USERNAME/.vscode-server/extensions" \

.devcontainer/devcontainer.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "code-style",
33
"remoteUser": "code",
4-
"dockerComposeFile": ["../docker-compose.yml"],
4+
"dockerComposeFile": ["../compose.yml"],
55
"service": "php",
66
"workspaceFolder": "/workspace",
77
"postStartCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}",
@@ -18,5 +18,9 @@
1818
"mhutchie.git-graph"
1919
]
2020
}
21+
},
22+
"features": {
23+
"ghcr.io/devcontainers-contrib/features/go-task:1": {},
24+
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {}
2125
}
2226
}

.env

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ COMPOSE_PROJECT_NAME=code-style
33
REGISTRY_HOST=ghcr.io
44
REGISTRY_PATH=ilyes512
55

6-
IMAGE_REGISTRY_PHP=${REGISTRY_HOST}/${REGISTRY_PATH}/php82-fpm
7-
IMAGE_TAG_PHP_VSCODE=vscode-1.0.3
6+
IMAGE_REGISTRY_PHP=${REGISTRY_HOST}/${REGISTRY_PATH}/php83-fpm
7+
IMAGE_TAG_PHP_VSCODE=vscode-1.0.0

.gitattributes

+1-3
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
/ecs-local.php export-ignore
1616
/phpstan.neon export-igore
1717
/phpstan.dist.neon export-ignore
18-
/phpunit.xml export-ignore
19-
/phpunit.xml.dist export-ignore
2018
/Taskfile.dist.yml export-ignore
2119
/Taskfile.yml export-ignore
22-
/docker-compose.yml export-ignore
20+
/compose.yml export-ignore

.gitignore

-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
/composer.lock
55
/vendor
66
/phpstan.neon
7-
/phpunit.xml
8-
/.phpunit-cache
97
/.phplint.cache
108
/auth.json
119
Taskfile.yml

LICENSE

+4-18
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,7 @@
1-
MIT License
1+
Copyright 2023 Ilyes Ahidar
22

3-
Copyright (c) 2023 Ilyes512
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
44

5-
Permission is hereby granted, free of charge, to any person obtaining a copy
6-
of this software and associated documentation files (the "Software"), to deal
7-
in the Software without restriction, including without limitation the rights
8-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9-
copies of the Software, and to permit persons to whom the Software is
10-
furnished to do so, subject to the following conditions:
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
116

12-
The above copyright notice and this permission notice shall be included in all
13-
copies or substantial portions of the Software.
14-
15-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
7+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Taskfile.dev.yml

-77
This file was deleted.

Taskfile.dist.yml

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
version: "3"
2+
3+
dotenv: ['.env']
4+
5+
silent: true
6+
7+
tasks:
8+
9+
c:update:
10+
desc: Run composer update
11+
cmds:
12+
- task: c:exec
13+
vars: { SUBCMD: update }
14+
15+
c:install:
16+
desc: Run composer install
17+
cmds:
18+
- task: c:exec
19+
vars: { SUBCMD: install }
20+
21+
c:exec:
22+
desc: Run composer update or install
23+
internal: true
24+
preconditions:
25+
- sh: test '{{.SUBCMD}}' = 'install' -o '{{.SUBCMD}}' = 'update'
26+
msg: SUBCMD value needs to be either 'install' or 'update'
27+
cmds:
28+
- docker volume create php_composer_cache
29+
- docker run
30+
--interactive
31+
--tty
32+
--rm
33+
--volume "$(pwd)":/var/www
34+
--volume php_composer_cache:/home/composer/.composer
35+
--entrypoint ''
36+
-e COMPOSER_HOME=/home/composer/.composer
37+
$IMAGE_REPO_PHP:$IMAGE_TAG_PHP_BUILDER
38+
composer {{.SUBCMD}}
39+
--no-progress
40+
--prefer-dist
41+
--ignore-platform-reqs
42+
43+
stop:
44+
desc: Stop Devcontainer
45+
cmds:
46+
- docker compose stop
47+
48+
down:
49+
desc: Cleanup Devcontainer including volumes
50+
cmds:
51+
- docker compose down --volumes
52+
53+
cleanup:
54+
desc: Cleanup of almost all gitignored files and untracked files
55+
prompt: This could potentially delete untracked files!! Do you want to continue?
56+
summary: |
57+
Cleanup of almost all gitignored files, untracked files and development containers.
58+
59+
The following files/dirs are excluded:
60+
- /.idea
61+
- /.vscode
62+
cmds:
63+
- git clean
64+
-xd
65+
--force
66+
--exclude .idea
67+
--exclude .vscode
68+
69+
cleanup:all:
70+
desc: Cleanup of almost all gitignored files, untracked files and removal of development containers
71+
cmds:
72+
- task: down
73+
- task: cleanup

docker-compose.yml compose.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
version: "3.7"
1+
volumes:
2+
vscode-extensions:
3+
24
services:
35
php:
46
image: ${COMPOSE_PROJECT_NAME}-php-vscode:latest
@@ -14,6 +16,3 @@ services:
1416
# - $HOME/auth.json:/root/auth.json:ro
1517
- .:/workspace:delegated
1618
- vscode-extensions:/home/code/.vscode-server/extensions
17-
18-
volumes:
19-
vscode-extensions:

0 commit comments

Comments
 (0)