「✨」 feat: Changed folder structure to comply with the dumb subject
This commit is contained in:
21
Makefile
21
Makefile
@ -3,31 +3,34 @@ WEB_SERVER_NAME := nginx
|
|||||||
CMS_NAME := wordpress
|
CMS_NAME := wordpress
|
||||||
DOCKER_FOLDER := docker
|
DOCKER_FOLDER := docker
|
||||||
|
|
||||||
DOCKER_CONTEXT := .
|
DOCKER_CONTEXT := srcs/
|
||||||
DOCKERFILE_DB := $(DOCKER_FOLDER)/$(DB_SERVER_NAME)/Dockerfile
|
DOCKERFILE_DB := $(DOCKER_CONTEXT)$(DOCKER_FOLDER)/$(DB_SERVER_NAME)/Dockerfile
|
||||||
DOCKERFILE_WEVSRV := $(DOCKER_FOLDER)/$(WEB_SERVER_NAME)/Dockerfile
|
DOCKERFILE_WEVSRV := $(DOCKER_CONTEXT)$(DOCKER_FOLDER)/$(WEB_SERVER_NAME)/Dockerfile
|
||||||
DOCKERFILE_CMS := $(DOCKER_FOLDER)/$(CMS_NAME)/Dockerfile
|
DOCKERFILE_CMS := $(DOCKER_CONTEXT)$(DOCKER_FOLDER)/$(CMS_NAME)/Dockerfile
|
||||||
|
|
||||||
build-db:
|
build-db:
|
||||||
docker build -f $(DOCKERFILE_DB) -t $(DB_SERVER_NAME) .
|
docker build -f $(DOCKERFILE_DB) -t $(DB_SERVER_NAME) $(DOCKER_CONTEXT)
|
||||||
|
|
||||||
build-websrv:
|
build-websrv:
|
||||||
docker build -f $(DOCKERFILE_WEVSRV) -t $(WEB_SERVER_NAME) .
|
docker build -f $(DOCKERFILE_WEVSRV) -t $(WEB_SERVER_NAME) $(DOCKER_CONTEXT)
|
||||||
|
|
||||||
build-cms:
|
build-cms:
|
||||||
docker build -f $(DOCKERFILE_CMS) -t $(CMS_NAME) .
|
docker build -f $(DOCKERFILE_CMS) -t $(CMS_NAME) $(DOCKER_CONTEXT)
|
||||||
|
|
||||||
start-db:
|
start-db:
|
||||||
docker compose up db --build
|
docker compose -f $(DOCKER_CONTEXT)/docker-compose.yml up db --build
|
||||||
|
|
||||||
start-nginx:
|
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:
|
clean-db:
|
||||||
docker stop inception-db
|
docker stop inception-db
|
||||||
docker container rm inception-db
|
docker container rm inception-db
|
||||||
docker volume rm inception_wp-db
|
docker volume rm inception_wp-db
|
||||||
|
docker image rm inception-db
|
||||||
|
|
||||||
clean-nginx:
|
clean-nginx:
|
||||||
docker stop inception-nginx
|
docker stop inception-nginx
|
||||||
|
@ -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" ]
|
|
@ -28,7 +28,7 @@ services:
|
|||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
wordpress-php:
|
wordpress-php:
|
||||||
container_name: inception-workp-php
|
container_name: inception-wordp-php
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: docker/wordpress/dockerfile
|
dockerfile: docker/wordpress/dockerfile
|
BIN
srcs/docker/alpine/alpine-minirootfs-3.21.2-x86_64.tar.gz
Normal file
BIN
srcs/docker/alpine/alpine-minirootfs-3.21.2-x86_64.tar.gz
Normal file
Binary file not shown.
@ -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 version="0.1"
|
||||||
LABEL maintainer="KeyZox"
|
LABEL maintainer="KeyZox"
|
25
srcs/docker/wordpress/Dockerfile
Normal file
25
srcs/docker/wordpress/Dockerfile
Normal 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" ]
|
Reference in New Issue
Block a user