PHPIndex

This page lists files in the current directory. You can view content, get download/execute commands for Wget, Curl, or PowerShell, or filter the list using wildcards (e.g., `*.sh`).

Dockerfile
wget 'https://sme10.lists2.roe3.org/FreshRSS/.devcontainer/Dockerfile'
View Content
FROM alpine:3.20

ENV TZ UTC
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]

RUN apk add --no-cache \
	tzdata \
	apache2 php-apache2 \
	php php-curl php-gmp php-intl php-mbstring php-xml php-zip \
	php-ctype php-dom php-fileinfo php-iconv php-json php-opcache php-openssl php-phar php-session php-simplexml php-xmlreader php-xmlwriter php-xml php-tokenizer php-zlib \
	php-pdo_sqlite php-pdo_mysql php-pdo_pgsql \
	bash composer curl docker-cli-buildx git gpg make nodejs npm shellcheck shfmt sudo

RUN rm -f /etc/apache2/conf.d/languages.conf /etc/apache2/conf.d/info.conf \
		/etc/apache2/conf.d/status.conf /etc/apache2/conf.d/userdir.conf && \
	sed -r -i "/^\s*LoadModule .*mod_(alias|autoindex|negotiation|status).so$/s/^/#/" \
		/etc/apache2/httpd.conf && \
	sed -r -i "/^\s*#\s*LoadModule .*mod_(deflate|expires|headers|mime|remoteip|setenvif).so$/s/^\s*#//" \
		/etc/apache2/httpd.conf && \
	sed -r -i "/^\s*(CustomLog|ErrorLog|Listen) /s/^/#/" \
		/etc/apache2/httpd.conf

RUN adduser --ingroup www-data --disabled-password developer && \
	echo "developer ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/developer

ENV COPY_LOG_TO_SYSLOG On
ENV COPY_SYSLOG_TO_STDERR On
ENV CRON_MIN ''
ENV DATA_PATH ''
ENV FRESHRSS_ENV 'development'
ENV LISTEN '0.0.0.0:8080'
ENV TRUSTED_PROXY 0

EXPOSE 8080
README.md
wget 'https://sme10.lists2.roe3.org/FreshRSS/.devcontainer/README.md'
View Content
# Dev Container for FreshRSS

This is a [Development Container](https://containers.dev) to provide a one-click full development environment
with all the needed tools and configurations, to develop and test [FreshRSS](https://github.com/FreshRSS/FreshRSS/).

It can be used on your local machine (see for instance the [Dev Containers extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)),
or as [GitHub Codespaces](https://github.com/features/codespaces) simply in a Web browser:

[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new?hide_repo_select=true&ref=edge&repo=6322699)

## Test instance of FreshRSS

A test instance of FreshRSS is automatically started as visible from the *Ports* tab: check the *Local Address* column, and click on the *Open in browser* 🌐 icon.
It runs the FreshRSS code that you are currently editing.

Apache logs can be seen in `/var/log/apache2/access.log` and `/var/log/apache2/error.log`.

## Software tests

Running the tests can be done directly from the built-in terminal, e.g.:

```sh
make test-all
```
devcontainer.json
wget 'https://sme10.lists2.roe3.org/FreshRSS/.devcontainer/devcontainer.json'
View Content
// For format details, see https://aka.ms/devcontainer.json
{
	"name": "FreshRSS-dev-Alpine",
	"build": {
		"dockerfile": "Dockerfile"
	},
	"containerEnv": {
		"DATA_PATH": "/home/developer/freshrss-data"
	},
	"customizations": {
		"codespaces": {
			"openFiles": [
				".devcontainer/README.md"
			]
		},
		"vscode": {
			"extensions": [
				"bmewburn.vscode-intelephense-client",
				"DavidAnson.vscode-markdownlint",
				"dbaeumer.vscode-eslint",
				"eamodio.gitlens",
				"EditorConfig.EditorConfig",
				"foxundermoon.shell-format",
				"GitHub.vscode-pull-request-github",
				"mrmlnc.vscode-apache",
				"ms-azuretools.vscode-docker",
				"redhat.vscode-yaml",
				"timonwong.shellcheck",
				"ValeryanM.vscode-phpsab"
			]
		}
	},
	"forwardPorts": [
		8080
	],
	"portsAttributes": {
		"8080": {
			"label": "FreshRSS Apache",
			"onAutoForward": "notify"
		}
	},
	"remoteUser": "developer",
	"postCreateCommand": "sudo .devcontainer/postCreateCommand.sh"
}
postCreateCommand.sh
wget 'https://sme10.lists2.roe3.org/FreshRSS/.devcontainer/postCreateCommand.sh'
View Content
#!/bin/sh

ln -s "$(pwd)" /var/www/FreshRSS

cp ./Docker/*.Apache.conf /etc/apache2/conf.d/

./Docker/entrypoint.sh

chown -R developer:www-data /home/developer/freshrss-data
chmod -R g+rwX /home/developer/freshrss-data

httpd -c 'ErrorLog "/var/log/apache2/error.log"' -c 'CustomLog "/var/log/apache2/access.log" combined_proxy'