1
0

」 feat: Changed folder structure to comply with the dumb subject

This commit is contained in:
2025-01-12 15:17:52 +01:00
parent 45ef1f3ddf
commit 9f8cf6b3ea
17 changed files with 40 additions and 37 deletions

View File

@ -3,31 +3,34 @@ WEB_SERVER_NAME := nginx
CMS_NAME := wordpress
DOCKER_FOLDER := docker
DOCKER_CONTEXT := .
DOCKERFILE_DB := $(DOCKER_FOLDER)/$(DB_SERVER_NAME)/Dockerfile
DOCKERFILE_WEVSRV := $(DOCKER_FOLDER)/$(WEB_SERVER_NAME)/Dockerfile
DOCKERFILE_CMS := $(DOCKER_FOLDER)/$(CMS_NAME)/Dockerfile
DOCKER_CONTEXT := srcs/
DOCKERFILE_DB := $(DOCKER_CONTEXT)$(DOCKER_FOLDER)/$(DB_SERVER_NAME)/Dockerfile
DOCKERFILE_WEVSRV := $(DOCKER_CONTEXT)$(DOCKER_FOLDER)/$(WEB_SERVER_NAME)/Dockerfile
DOCKERFILE_CMS := $(DOCKER_CONTEXT)$(DOCKER_FOLDER)/$(CMS_NAME)/Dockerfile
build-db:
docker build -f $(DOCKERFILE_DB) -t $(DB_SERVER_NAME) .
docker build -f $(DOCKERFILE_DB) -t $(DB_SERVER_NAME) $(DOCKER_CONTEXT)
build-websrv:
docker build -f $(DOCKERFILE_WEVSRV) -t $(WEB_SERVER_NAME) .
docker build -f $(DOCKERFILE_WEVSRV) -t $(WEB_SERVER_NAME) $(DOCKER_CONTEXT)
build-cms:
docker build -f $(DOCKERFILE_CMS) -t $(CMS_NAME) .
docker build -f $(DOCKERFILE_CMS) -t $(CMS_NAME) $(DOCKER_CONTEXT)
start-db:
docker compose up db --build
docker compose -f $(DOCKER_CONTEXT)/docker-compose.yml up db --build
start-nginx:
docker compose up nginx --build
docker compose -f $(DOCKER_CONTEXT)/docker-compose.yml up nginx --build
start-wordp:
docker compose -f $(DOCKER_CONTEXT)/docker-compose.yml up wordpress-php --build
clean-db:
docker stop inception-db
docker container rm inception-db
docker volume rm inception_wp-db
docker image rm inception-db
clean-nginx:
docker stop inception-nginx

View File

@ -1,26 +0,0 @@
FROM alpine:3.21
LABEL version="0.1"
LABEL maintainer="KeyZox"
RUN set -eux; \
adduser -u 82 -D -S -G www-data www-data
RUN set -x \
&& apk add --no-cache php84-fpm wget
VOLUME /var/www/html
WORKDIR /var/www/html
RUN wget https://wordpress.org/wordpress-6.7.1.tar.gz
&& tar -xzvf wordpress-6.7.1.zip
COPY docker-entrypoint.sh /
RUN [ "chmod", "+x", "/docker-entrypoint.sh" ]
ENTRYPOINT [ "/docker-entrypoint.sh" ]
WORKDIR /var/www/html
STOPSIGNAL SIGQUIT
EXPOSE 9000
CMD [ "php-fpm84", "-F" ]

View File

@ -28,7 +28,7 @@ services:
restart: unless-stopped
wordpress-php:
container_name: inception-workp-php
container_name: inception-wordp-php
build:
context: .
dockerfile: docker/wordpress/dockerfile

View File

@ -1,4 +1,5 @@
FROM alpine:3.21
FROM scratch
ADD docker/alpine/alpine-minirootfs-3.21.2-x86_64.tar.gz /
LABEL version="0.1"
LABEL maintainer="KeyZox"

View File

@ -0,0 +1,25 @@
FROM alpine:3.21
LABEL version="0.1"
LABEL maintainer="KeyZox"
RUN set -x \
&& adduser -u 82 -D -S -G www-data www-data \
&& apk add --no-cache php84-fpm wget
VOLUME /var/www/html
WORKDIR /var/www/html
RUN wget https://wordpress.org/wordpress-6.7.1.tar.gz \
&& tar -xzvf wordpress-6.7.1.tar.gz \
&& rm workpress-6.7.1.tar.gz
#COPY docker-entrypoint.sh /
#RUN [ "chmod", "+x", "/docker-entrypoint.sh" ]
#ENTRYPOINT [ "/docker-entrypoint.sh" ]
WORKDIR /var/www/html
STOPSIGNAL SIGQUIT
EXPOSE 9000
CMD [ "php-fpm84", "-F" ]

View File