docker: init basic dev setup

This commit is contained in:
2025-03-26 11:25:27 +01:00
parent ab8952feea
commit 3410f93767
2 changed files with 45 additions and 0 deletions

22
docker/Dockerfile Normal file
View File

@@ -0,0 +1,22 @@
# Use the official Debian image as a base
FROM debian:latest
# Set environment variables
# ENV DEBIAN_FRONTEND=noninteractive
# Update the package list and install Apache2 and MariaDB
RUN apt-get update && \
apt-get install -y apache2 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Copy your website files to the Apache document root (optional)
COPY ./install/apache2-sites/coloradio.conf /etc/conf/apache2/sites-enabled/
# Expose ports for Apache and MariaDB
EXPOSE 80
# Start both Apache and MariaDB
CMD service apache2 start && \
tail -f /var/log/apache2/access.log

23
docker/docker-compose.yml Normal file
View File

@@ -0,0 +1,23 @@
services:
#web:
# build:
# context: ..
# dockerfile: ./docker/Dockerfile
# ports:
# - "80:80"
# #volumes:
# #- ./your-website-files:/var/www/html/
# #- ./httpd.conf:/etc/apache2/sites-available/000-default.conf
db:
image: mariadb:10
environment:
MYSQL_ROOT_PASSWORD: yourpassword
#MYSQL_DATABASE: yourdatabase
MYSQL_USER: test
MYSQL_PASSWORD: test
ports:
- "3306:3306"
volumes:
- ../install/init.sql:/docker-entrypoint-initdb.d/01-init.sql
- ../install/create.sql:/docker-entrypoint-initdb.d/02-create.sql