Skip to content

Commit 48a2fc3

Browse files
committed
Add composer dependency manager
1 parent ec86f20 commit 48a2fc3

File tree

5 files changed

+1321
-1
lines changed

5 files changed

+1321
-1
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
/root/app/www/public/logs/*
22
/root/app/www/public/api/container-alias.json
33
/.vscode/*
4+
5+
/vendor/

Dockerfile

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,25 @@ RUN \
2323
# install sockets
2424
RUN apk add --no-cache \
2525
php83-sockets
26-
26+
2727
# install sqlite3
2828
RUN apk add --no-cache \
2929
php83-sqlite3
3030

31+
# install composer and PHP dependencies
32+
RUN apk add --no-cache \
33+
php83-phar \
34+
php83-mbstring \
35+
php83-openssl \
36+
php83-json \
37+
php83-tokenizer \
38+
php83-dom \
39+
php83-xml \
40+
php83-xmlwriter \
41+
php83-simplexml \
42+
curl \
43+
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
44+
3145
# add regctl for container digest checks
3246
ARG TARGETARCH
3347
ARG REGCTL_VERSION=v0.5.6
@@ -47,6 +61,11 @@ HEALTHCHECK --interval=60s --timeout=30s --start-period=180s --start-interval=10
4761
# add local files
4862
COPY root/ /
4963

64+
# Copy composer files and install dependencies
65+
COPY composer.json composer.lock* /app/www/
66+
WORKDIR /app/www
67+
RUN composer install --no-dev --optimize-autoloader
68+
5069
ARG COMMIT=unknown
5170
ARG COMMITS=0
5271
ARG BRANCH=unknown

composer.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"name": "notifiarr/dockwatch",
3+
"type": "project",
4+
"require": {
5+
"cboden/ratchet": "^0.4.4"
6+
},
7+
"license": "MIT"
8+
}

0 commit comments

Comments
 (0)