diff --git a/Dockerfile b/Dockerfile index 96b3be3..26c1e35 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM jkaninda/nginx-php-fpm +FROM php:8.2-fpm # Install git and ssh-keygen RUN apt-get update && \ @@ -19,13 +19,12 @@ RUN if [ ! -f "$SSH_KEY_PATH" ]; then \ fi # Nginx configuration -COPY nginx.conf.dist /etc/nginx/nginx.conf COPY webhook.php /usr/share/nginx/html/webhook.php # Entrypoint.sh COPY 99-init-repos.sh /docker-entrypoint.d/99-init-repos.sh # Expose ports -EXPOSE 80 +EXPOSE 9000 # Fetch repo -CMD ["nginx","-g","daemon: off;"] \ No newline at end of file +CMD ["nginx","-g","daemon: off;"] diff --git a/docker-compose.yml b/docker-compose.yml index 8caf376..a73c4c8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,9 +6,13 @@ services: restart: always volumes: - static-files:/usr/share/nginx/html - - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro + configs: + - source: nginx_conf + target: /etc/nginx/conf.d/default.conf networks: - nginx-network + depends_on: + - php php: image: php:8.2-fpm @@ -32,6 +36,10 @@ services: - GIT_SERVER_DADI_STAGING=${GIT_SERVER_DADI_STAGING} - WEBHOOK_SECRET=${WEBHOOK_SECRET} +configs: + ngins_conf: + file: ./nginx.conf + volumes: static-files: name: ${STATIC_FILES_VOLUME_NAME}