environment for developing and running the action

This commit is contained in:
Your Name
2023-11-18 16:50:22 +02:00
parent 08f28bbc80
commit bd00d55e98
5 changed files with 40 additions and 1 deletions

1
.env.example Normal file
View File

@@ -0,0 +1 @@
GITEA_INSTANCE_BASE_URL="https://gitea.example.com"

3
.gitignore vendored
View File

@@ -1 +1,2 @@
.idea
.idea
/.env

20
Dockerfile Normal file
View File

@@ -0,0 +1,20 @@
FROM rosven9856/basic-php-fpm-alpine:8.2.12.2
RUN addgroup -g 1000 --system php
RUN adduser -G php --system -D -s /bin/sh -u 1000 php
RUN chown php:php /home/php
RUN chown php:php /usr/local/bin/composer
RUN mkdir /var/src
RUN chown -R php:php /var/src
WORKDIR /var/src
COPY ./src /var/src
# RUN composer install
USER php
CMD ["php", "/var/src/app.php"]

16
docker-compose.yml Normal file
View File

@@ -0,0 +1,16 @@
version: "3"
services:
php-fpm:
container_name: php-fpm
build:
context: ./
dockerfile: Dockerfile
environment:
GITEA_INSTANCE_BASE_URL: ${GITEA_INSTANCE_BASE_URL}
volumes:
- ./src:/var/src
networks:
- bridge
networks:
bridge:
driver: bridge

1
src/app.php Normal file
View File

@@ -0,0 +1 @@
<?php