Skip to content

Commit

Permalink
chore: initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
darkterminal committed Apr 25, 2023
1 parent fbda518 commit 7c2df98
Show file tree
Hide file tree
Showing 12 changed files with 1,334 additions and 0 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git
1 change: 1 addition & 0 deletions .env-example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VERSION=1.0.0
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
composer.phar
/vendor/
.env

# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
Expand Down
51 changes: 51 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
FROM php:fpm

WORKDIR /var/www/html

COPY . /var/www/html

RUN apt-get update

RUN apt-get install -y --no-install-recommends \
libfreetype6-dev \
libicu-dev \
libjpeg-dev \
libmagickwand-dev \
libpng-dev \
libwebp-dev \
libzip-dev

RUN docker-php-ext-install -j "$(nproc)" \
pdo \
pdo_mysql \
mysqli \
bcmath \
exif \
gd \
intl \
zip

RUN docker-php-ext-configure gd \
--with-freetype \
--with-jpeg \
--with-webp


RUN set -eux; \
docker-php-ext-enable opcache; \
{ \
echo 'opcache.memory_consumption=128'; \
echo 'opcache.interned_strings_buffer=8'; \
echo 'opcache.max_accelerated_files=4000'; \
echo 'opcache.revalidate_freq=2'; \
echo 'opcache.fast_shutdown=1'; \
} > /usr/local/etc/php/conf.d/opcache-recommended.ini

RUN pecl install xdebug && docker-php-ext-enable xdebug

RUN pecl install imagick-3.7.0 && docker-php-ext-enable imagick

RUN adduser sleekwaredb-user
USER sleekwaredb-user

CMD ["php-fpm"]
25 changes: 25 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "gitpod/sleekwaredb-api",
"description": "SleekwareDB API",
"type": "project",
"autoload": {
"psr-4": {
"SleekwaredbApi\\": "src/"
}
},
"authors": [
{
"name": "Imam Ali Mustofa",
"email": "d.darkterminal@gmail.com"
}
],
"require": {
"slim/slim": "4.*",
"slim/psr7": "^1.5",
"php-di/php-di": "^6.4",
"justinrainbow/json-schema": "^5.2"
},
"require-dev": {
"symfony/dotenv": "^6.1"
}
}
Loading

0 comments on commit 7c2df98

Please sign in to comment.