little start

This commit is contained in:
whaffman 2025-05-12 16:37:06 +02:00
parent b8cf0c7bf8
commit c51cd0a471
3 changed files with 90 additions and 0 deletions

View File

@ -0,0 +1,22 @@
# **************************************************************************** #
# #
# :::::::: #
# Makefile :+: :+: #
# +:+ #
# By: whaffman <whaffman@student.codam.nl> +#+ #
# +#+ #
# Created: 2025/05/12 15:33:56 by whaffman #+# #+# #
# Updated: 2025/05/12 15:35:21 by whaffman ######## odam.nl #
# #
# **************************************************************************** #
up:
docker-compose up -d --build
down:
docker-compose down
remove:
docker-compose down --rmi all
@docker volume rm $(shell docker volume ls -qf dangling=true) || true

View File

@ -0,0 +1,65 @@
version: '3.8'
env_file:
- .env
secrets:
mariadb_root_password:
file: ./secrets/db_root_password
mariadb_user_password:
file: ./secrets/db_password
wordpress_admin_password:
file: ./requirements/wordpress/.env
wordpress_user_password:
file: ./requirements/wordpress/.env
services:
mariadb:
restart: always
build:
context: ./requirements/mariadb
dockerfile: Dockerfile
ports:
- '3306:3306'
networks:
- docker-network
volumes:
- data_mariadb:/var/lib/mysql
nginx:
restart: always
build:
context: ./requirements/nginx
dockerfile: Dockerfile
ports:
-'443:443'
networks:
- docker-network
volumes:
- data_wordpress:/var/www/html
wordpress:
restart: always
build:
context: ./requirements/wordpress
dockerfile: Dockerfile
depends_on:
- mariadb
ports:
- '9000:9000'
networks:
- docker-network
volumes:
- data_wordpress:/var/www/html
networks:
docker-network:
volumes:
data_mariadb:
driver: local
data_wordpress:
driver: local

View File

@ -0,0 +1,3 @@
FROM alpine:3.20
RUN apk add --no-cache mariadb mariadb-client