Skip to content

Commit

Permalink
Update docker image to use latest ubuntu version
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminjonard committed Apr 30, 2024
1 parent 432f476 commit 3c28432
Show file tree
Hide file tree
Showing 30 changed files with 47 additions and 48 deletions.
14 changes: 7 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,20 @@ ARG DEBIAN_FRONTEND=noninteractive

# Environment variables
ENV APP_ENV='prod'
ENV PUID='1000'
ENV PGID='1000'
ENV PUID='1001'
ENV PGID='1001'
ENV USER='koillection'
ENV COMPOSER_ALLOW_SUPERUSER=1

COPY ./ /var/www/koillection

# Add User and Group
RUN addgroup --gid "$PGID" "$USER" && \
adduser --gecos '' --no-create-home --disabled-password --uid "$PUID" --gid "$PGID" "$USER" && \

# Install some basics dependencies
apt-get update && \
RUN apt-get update && \
apt-get install -y curl lsb-release software-properties-common gnupg2 && \
# Add User and Group
addgroup --gid "$PGID" "$USER" && \
adduser --gecos '' --no-create-home --disabled-password --uid "$PUID" --gid "$PGID" "$USER" && \
# PHP
add-apt-repository ppa:ondrej/php && \
# Nodejs
Expand Down Expand Up @@ -73,7 +74,6 @@ RUN addgroup --gid "$PGID" "$USER" && \
sed -i "s/group = www-data/group = $USER/g" /etc/php/8.3/fpm/pool.d/www.conf && \
chown -R "$USER":"$USER" /var/www/koillection && \
chmod +x /var/www/koillection/docker/entrypoint.sh && \
mkdir /run/php && \
# Add nginx and PHP config files
cp /var/www/koillection/docker/default.conf /etc/nginx/nginx.conf && \
cp /var/www/koillection/docker/php.ini /etc/php/8.3/fpm/conf.d/php.ini
Expand Down
15 changes: 7 additions & 8 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ ARG DEBIAN_FRONTEND=noninteractive

# Environment variables
ENV APP_ENV='prod'
ENV PUID='1000'
ENV PGID='1000'
ENV PUID='1001'
ENV PGID='1001'
ENV USER='koillection'

COPY ./docker/entrypoint-dev.sh /entrypoint.sh

# Add User and Group
RUN addgroup --gid "$PGID" "$USER" && \
adduser --gecos '' --no-create-home --disabled-password --uid "$PUID" --gid "$PGID" "$USER" && \
# Install some basics dependencies
apt-get update && \
RUN apt-get update && \
apt-get install -y curl lsb-release software-properties-common gnupg2 vim && \
# Add User and Groups
addgroup --gid "$PGID" "$USER" && \
adduser --gecos '' --no-create-home --disabled-password --uid "$PUID" --gid "$PGID" "$USER" && \
# PHP
add-apt-repository ppa:ondrej/php && \
# Nodejs
Expand Down Expand Up @@ -47,8 +47,7 @@ RUN addgroup --gid "$PGID" "$USER" && \
#Install composer dependencies
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && \
# Set permissions
chmod +x /entrypoint.sh && \
mkdir /run/php
chmod +x /entrypoint.sh

# Add nginx and PHP config files
COPY ./docker/default.conf /etc/nginx/nginx.conf
Expand Down
12 changes: 6 additions & 6 deletions Dockerfile.frankenphp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ FROM dunglas/frankenphp

# Environment variables
ENV APP_ENV=prod
ENV PUID=1000
ENV PGID=1000
ENV PUID=1001
ENV PGID=1001
ENV USER=koillection
ENV FRANKENPHP_CONFIG="worker /app/public/public/index.php"
ENV FRANKENPHP_SERVER_NAME=":80"
Expand All @@ -12,12 +12,12 @@ ENV COMPOSER_ALLOW_SUPERUSER=1
COPY ./ /app/public
COPY ./docker/Caddyfile /etc/caddy/Caddyfile

# Add User and Group
RUN addgroup --gid "$PGID" "$USER" && \
adduser --gecos '' --no-create-home --disabled-password --uid "$PUID" --gid "$PGID" "$USER" && \
# Install some basics dependencies
apt-get update && \
RUN apt-get update && \
apt-get install -y curl wget lsb-release gnupg2 && \
# Add User and Group
addgroup --gid "$PGID" "$USER" && \
adduser --gecos '' --no-create-home --disabled-password --uid "$PUID" --gid "$PGID" "$USER" && \
# Nodejs
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
NODE_MAJOR=21 && \
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Admin/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\StreamedResponse;
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Contracts\Translation\TranslatorInterface;
use ZipStream\ZipStream;
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Admin/ConfigurationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use Doctrine\Persistence\ManagerRegistry;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Contracts\Translation\TranslatorInterface;

Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Admin/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
use Doctrine\Persistence\ManagerRegistry;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Contracts\Translation\TranslatorInterface;

Expand Down
2 changes: 1 addition & 1 deletion src/Controller/AlbumController.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
use Doctrine\Persistence\ManagerRegistry;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Contracts\Translation\TranslatorInterface;

class AlbumController extends AbstractController
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/ChoiceListController.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use Doctrine\Persistence\ManagerRegistry;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Contracts\Translation\TranslatorInterface;

class ChoiceListController extends AbstractController
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/CollectionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
use Doctrine\Persistence\ManagerRegistry;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Contracts\Translation\TranslatorInterface;

class CollectionController extends AbstractController
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/DatumController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use App\Enum\VisibilityEnum;
use Symfony\Bridge\Doctrine\Attribute\MapEntity;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Routing\Attribute\Route;

class DatumController extends AbstractController
{
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/HistoryController.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use App\Service\PaginatorFactory;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Routing\Attribute\Route;

class HistoryController extends AbstractController
{
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/InventoryController.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Contracts\Translation\TranslatorInterface;

class InventoryController extends AbstractController
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/ItemController.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Contracts\Translation\TranslatorInterface;

class ItemController extends AbstractController
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/LoanController.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use Symfony\Bridge\Doctrine\Attribute\MapEntity;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Contracts\Translation\TranslatorInterface;

class LoanController extends AbstractController
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/PhotoController.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use Doctrine\Persistence\ManagerRegistry;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Contracts\Translation\TranslatorInterface;

class PhotoController extends AbstractController
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/ProfileController.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use Doctrine\Persistence\ManagerRegistry;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Contracts\Translation\TranslatorInterface;

class ProfileController extends AbstractController
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Scraper/CollectionScraperController.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Component\String\Slugger\SluggerInterface;
use Symfony\Component\Validator\Validator\ValidatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Scraper/ItemScraperController.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Component\String\Slugger\SluggerInterface;
use Symfony\Component\Validator\Validator\ValidatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Scraper/WishScraperController.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Component\String\Slugger\SluggerInterface;
use Symfony\Component\Validator\Validator\ValidatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/SearchController.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Routing\Attribute\Route;

class SearchController extends AbstractController
{
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/SecurityController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/SettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use Doctrine\Persistence\ManagerRegistry;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Contracts\Translation\TranslatorInterface;

class SettingsController extends AbstractController
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/SignController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use App\Repository\ItemRepository;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Routing\Attribute\Route;

class SignController extends AbstractController
{
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/StatisticsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use App\Service\Graph\ChartBuilder;
use App\Service\Graph\TreeBuilder;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Routing\Attribute\Route;

class StatisticsController extends AbstractController
{
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/TagCategoryController.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use Symfony\Bridge\Doctrine\Attribute\MapEntity;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Contracts\Translation\TranslatorInterface;

class TagCategoryController extends AbstractController
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/TagController.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Contracts\Translation\TranslatorInterface;

class TagController extends AbstractController
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/TemplateController.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Contracts\Translation\TranslatorInterface;

class TemplateController extends AbstractController
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/ToolsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use Symfony\Component\DependencyInjection\Attribute\Autowire;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\StreamedResponse;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Routing\Attribute\Route;
use ZipStream\ZipStream;

class ToolsController extends AbstractController
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/WishController.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use Doctrine\Persistence\ManagerRegistry;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Contracts\Translation\TranslatorInterface;

class WishController extends AbstractController
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/WishlistController.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
use Doctrine\Persistence\ManagerRegistry;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Contracts\Translation\TranslatorInterface;

class WishlistController extends AbstractController
Expand Down

0 comments on commit 3c28432

Please sign in to comment.