version: "3"
services:
flarum:
image: chopin2712/flarum:latest
container_name: flarum
volumes:
- data:/flarum/app
ports:
- 8888:80
depends_on:
- mariadb
mariadb:
image: mariadb:10.5
container_name: mariadb
environment:
- MYSQL_ROOT_PASSWORD=supersecurepassword
- MYSQL_DATABASE=flarum
- MYSQL_USER=flarum
- MYSQL_PASSWORD=supersecurepassword
volumes:
- db:/var/lib/mysql
volumes:
data:
db:
sudo docker-compose up -d
http://your-server:8888 and fill those db info:mariadbflarumflarumflarum_# This file suffers from an optimisation problem due to using debian instead of alpine
FROM debian:latest
# Install php, php extensions, php-fpm, composer and nginx
RUN apt-get update && apt install -y php7.4-fpm php7.4-curl php7.4-dom php7.4-gd php7.4-json php7.4-mbstring php7.4-mysql php7.4-tokenizer php7.4-zip nginx composer
# Install flarum
RUN mkdir /flarum && composer create-project flarum/flarum /flarum
# Configure the file permissions
RUN chmod 775 -R /flarum && chown www-data:www-data -R /flarum
# Configures php-fpm and nginx
RUN mkdir -p /run/php # This just creates the location where php-fpm will get started
ADD nginx.conf /etc/nginx/sites-enabled/default
# Add the starting script for php-fpm and nginx
ADD entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
CMD [ "/entrypoint.sh" ]
docker build . -t my-flarum
docker-slim build --target my-flarum --expose 80 --preserve-path /flarum --tag chopin2712/flarum
Content type
Image
Digest
sha256:08c637c44…
Size
38.6 MB
Last updated
over 3 years ago
docker pull chopin2712/flarum