Skip to content

Commit 4887708

Browse files
committed
Docker files...
1 parent e9b7b9d commit 4887708

File tree

4 files changed

+117
-2
lines changed

4 files changed

+117
-2
lines changed

Dockerfile

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# ---- Base image ------------------------------------------------------------
2+
FROM php:8.2-apache
3+
4+
# ---- System packages & PHP extensions -------------------------------------
5+
RUN apt-get update && apt-get install -y \
6+
libcurl4-openssl-dev \
7+
libgd-dev \
8+
libgmp-dev \
9+
libicu-dev \
10+
libonig-dev \
11+
libxml2-dev \
12+
libxslt1-dev \
13+
libldap2-dev \
14+
libzip-dev \
15+
zip \
16+
unzip \
17+
git \
18+
locales \
19+
&& docker-php-ext-configure intl \
20+
&& docker-php-ext-configure gd --with-jpeg --with-freetype \
21+
&& docker-php-ext-install \
22+
curl \
23+
gd \
24+
gmp \
25+
intl \
26+
mbstring \
27+
mysqli \
28+
pdo \
29+
pdo_mysql \
30+
xsl \
31+
gettext \
32+
dom \
33+
ldap \
34+
zip \
35+
&& a2enmod rewrite
36+
37+
RUN apt-get update && apt-get install -y default-mysql-client
38+
39+
40+
# ---- Add Python and smartcard support --------------------------------------
41+
RUN apt-get update && apt-get install -y \
42+
python3 \
43+
python3-pip \
44+
pcscd \
45+
pcsc-tools \
46+
libpcsclite-dev \
47+
&& pip3 install pyscard \
48+
&& systemctl enable pcscd || true \
49+
&& rm -rf /var/lib/apt/lists/*
50+
51+
52+
RUN { \
53+
echo "display_errors = Off"; \
54+
echo "display_startup_errors = Off"; \
55+
echo "log_errors = On"; \
56+
echo "error_reporting = E_ALL & ~E_DEPRECATED & ~E_WARNING & ~E_NOTICE"; \
57+
echo "error_log = /var/log/php_errors.log"; \
58+
} > /usr/local/etc/php/conf.d/99-production.ini
59+
60+
61+
# ---- Locale configuration --------------------------------------------------
62+
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
63+
64+
# ---- Working directory -----------------------------------------------------
65+
WORKDIR /var/www/html
66+
67+
# ---- Copy application files ------------------------------------------------
68+
COPY . /var/www/html
69+
70+
# ---- Permissions -----------------------------------------------------------
71+
RUN chown -R www-data:www-data /var/www/html \
72+
&& chmod -R 755 /var/www/html
73+
74+
# ---- Apache vHost ----------------------------------------------------------
75+
COPY docker/apache2.conf /etc/apache2/sites-available/000-default.conf
76+
77+
# ---- Composer --------------------------------------------------------------
78+
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
79+
RUN composer install --no-dev --no-interaction --optimize-autoloader
80+
81+
# ---- Entry point -----------------------------------------------------------
82+
COPY docker/entrypoint.sh /entrypoint.sh
83+
RUN chmod +x /entrypoint.sh
84+
85+
EXPOSE 80
86+
ENTRYPOINT ["/entrypoint.sh"]

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8.2.3
1+
8.2.3-d

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "TimeTrack is a PHP-written time recording tool for small businesses",
44
"type": "software",
55
"license": "GNU GPL",
6-
"version": "8.2.3",
6+
"version": "8.2.3-d",
77
"authors": [
88
{
99
"name": "Bryan Boehnke-Avan",

docker-compose.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
version: "3.9"
2+
3+
services:
4+
timetrack:
5+
image: openducks/timetrack:latest
6+
container_name: timetrack
7+
ports:
8+
- "8080:80"
9+
depends_on:
10+
- db
11+
volumes:
12+
- .:/var/www/html
13+
restart: unless-stopped
14+
15+
db:
16+
image: mariadb:11
17+
container_name: timetrack-db
18+
restart: unless-stopped
19+
environment:
20+
MYSQL_ROOT_PASSWORD: root
21+
MYSQL_DATABASE: ab
22+
MYSQL_USER: timetool
23+
MYSQL_PASSWORD: yourpassword
24+
volumes:
25+
- db_data:/var/lib/mysql
26+
command: ['--character-set-server=utf8mb4', '--collation-server=utf8mb4_unicode_ci']
27+
28+
volumes:
29+
db_data:

0 commit comments

Comments
 (0)