Commit 198527cc authored by Jean-Baptiste Oellers's avatar Jean-Baptiste Oellers
Browse files

Ajout version docker pour api platform

parent 36add381
Loading
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
FROM dunglas/frankenphp:1-php8.4

# https://getcomposer.org/doc/03-cli.md#composer-allow-superuser
ENV COMPOSER_ALLOW_SUPERUSER=1

RUN set -eux; \
    install-php-extensions \
        @composer \
        pdo_mysql \
        pdo_pgsql \
    ;

COPY ./app_api_platform_entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
+7 −0
Original line number Diff line number Diff line
#!/bin/sh
set -e

composer install --optimize-autoloader --prefer-dist --no-progress --no-interaction

cd /app/public
frankenphp php-server
+17 −0
Original line number Diff line number Diff line
@@ -223,3 +223,20 @@ services:
        - HTTP_PROXY
        - ENV_MODE
    command: ["/bin/bash", "/entrypoint.sh"]

  ######################################################################
  ### API PLATFORM
  app-api-platform:
    container_name: app-api-platform
    volumes:
      - ./api-platform:/app
    networks:
      - app-network
    build:
      context: ./docker/
      dockerfile: app_api_platform_Dockerfile
    # ports:
    #   - "8980:80"
    environment:
      DATABASE_URL: postgresql://${POSGRESQL_USER}:${POSGRESQL_PASS}@${POSGRESQL}:${POSGRESQL_PORT}/${POSGRESQL_BASE}?serverVersion=16&charset=utf8
    command: ["/bin/bash", "/entrypoint.sh"]