1
0

」 feat(Mariadb): Started dockerfile

This commit is contained in:
2024-12-22 18:56:32 +01:00
parent 9b2023aaa7
commit 5e57f79294
8 changed files with 80 additions and 9 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*/.env
.env

9
flake.nix Normal file
View File

@ -0,0 +1,9 @@
{
inputs = {
};
outputs = {
};
}

View File

@ -1,8 +1,9 @@
version: "3" version: "3"
name: inception
volumes: volumes:
db: wp-db:
wordpress: wp-site:
networks: networks:
inception: inception:
@ -19,7 +20,9 @@ services:
- wordpress-php - wordpress-php
- db - db
volumes: volumes:
- wordpress - wp-site:/var/www/html
ports:
- "443:443"
restart: unless-stopped restart: unless-stopped
wordpress-php: wordpress-php:
@ -28,6 +31,8 @@ services:
- inception - inception
environment: environment:
- TZ=Europe/Paris - TZ=Europe/Paris
volumes:
- wp-site:/var/www/html
depends_on: depends_on:
- db - db
restart: unless-stopped restart: unless-stopped
@ -38,5 +43,6 @@ services:
- inception - inception
environment: environment:
- TZ=Europe/Paris - TZ=Europe/Paris
volumes:
- wp-db:/var/lib/mysql
restart: unless-stopped restart: unless-stopped

View File

@ -0,0 +1,20 @@
FROM alpine:3.21
LABEL version="0.1"
LABEL maintainer="KeyZox"
RUN groupadd -r mysql \
&& useradd -r -g mysql mysql --home-dir /var/lib/mysql
RUN set -x \
&&
VOLUME /var/lib/mysql
COPY healthcheck.sh /healthcheck.sh
COPY docker-entrypoints.sh /docker-entrypoints.sh
ENTRYPOINT ["docker-entrypoint.sh"]
EXPOSE 3306
CMD [ "mariadbd" ]

View File

@ -4,20 +4,23 @@ LABEL version="0.1"
LABEL maintainer="KeyZox" LABEL maintainer="KeyZox"
RUN set -x \ RUN set -x \
&& apk update \
&& addgroup -g 101 -S nginx\ && addgroup -g 101 -S nginx\
&& adduser -S -D -H -u 101 -h /var/cache/nginx -s /sbin/nologin -G nginx -g nginx nginx \ && adduser -S -D -H -u 101 -h /var/cache/nginx -s /sbin/nologin -G nginx -g nginx nginx \
&& apk add nginx \ && apk add --no-cache nginx \
&& ln -sf /dev/stdout /var/log/nginx/access.log \ && ln -sf /dev/stdout /var/log/nginx/access.log \
&& ln -sf /dev/stderr /var/log/nginx/error.log \ && ln -sf /dev/stderr /var/log/nginx/error.log \
&& apk add --no-cache tzdata && apk add --no-cache tzdata
STOPSIGNAL SIGQUIT WORKDIR /etc/nginx
VOLUME /etc/nginx
RUN mkdir -P /etc/nginx/sites-available
COPY docker-entrypoint.sh / COPY docker-entrypoint.sh /
RUN [ "chmod", "+x", "/docker-entrypoint.sh" ]
ENTRYPOINT [ "/docker-entrypoint.sh" ] ENTRYPOINT [ "/docker-entrypoint.sh" ]
WORKDIR /etc/nginx
STOPSIGNAL SIGQUIT
EXPOSE 80 EXPOSE 80
CMD [ "nginx", "-g", "daemon off;" ] CMD [ "nginx", "-g", "daemon off;" ]

View File

@ -1 +1,3 @@
echo WTF #!/bin/sh
exec "$@"

View File

@ -0,0 +1,26 @@
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

@ -0,0 +1,3 @@
#!/bin/sh
exec "$@"