babysteps

This commit is contained in:
Danny Houtworm 2023-06-25 07:05:00 +00:00
parent dc17b3b9cf
commit e43c2f854d
5 changed files with 33 additions and 22 deletions

View File

@ -12,5 +12,5 @@ down:
clean: down
sudo docker network rm wordpress
sudo docker system prune
rm -rf ./data ./build
yes | sudo docker system prune -a
rm -rf ~/data ./build

View File

@ -6,23 +6,39 @@ services:
container_name: nginx
restart: always
volumes:
- /data/nginx/config:/etc/nginx
- /data/nginx/log/error.log:/var/log/error.log
- /data/nginx/log/access.log:/var/log/access.log
- ~/data/nginx/config:/etc/nginx
- ~/data/nginx/log/error.log:/var/log/error.log
- ~/data/nginx/log/access.log:/var/log/access.log
- /etc/letsencrypt/:/etc/letsencrypt/
- /etc/localtime:/etc/localtime:ro
ports:
- 80:80
- 443:443
networks:
wordpress:
ipv4_address: 172.20.30.10
mariadb:
build: ./srcs/requirements/mariadb
container_name: mariadb
restart: always
volumes:
- /data/mariadb/data:/var/lib/mysql
- /data/mariadb/config:/etc/mysql/conf.d
- /data/mariadb/logs:/var/log/mysql
- ~/data/mariadb/data:/var/lib/mysql
- ~/data/mariadb/config:/etc/mysql/conf.d
- ~/data/mariadb/logs:/var/log/mysql
- /etc/localtime:/etc/localtime:ro
networks:
wordpress:
ipv4_address: 172.20.30.20
wordpress:
build: ./srcs/requirements/wordpress
container_name: wordpress
restart: always
volumes:
- ~/data/wordpress:/var/www
- /etc/localtime:/etc/localtime:ro
networks:
wordpress:
ipv4_address: 172.20.30.30
networks:
wordpress:

View File

@ -5,7 +5,6 @@ RUN apk add mariadb
RUN apk add mariadb-client
RUN apk add telegraf
COPY srcs/start.sh /root/start.sh
COPY srcs/telegraf.conf /etc/telegraf/telegraf.conf
COPY srcs/my.cnf /etc/my.cnf.d/mariadb-server.cnf
COPY srcs/maria.sql /root/maria.sql
WORKDIR /root/

View File

@ -8,7 +8,6 @@ RUN apk add telegraf
COPY srcs/start.sh /root/start.sh
COPY srcs/nginx.conf /etc/nginx/nginx.conf
COPY srcs/index.html /var/www/index.html
COPY srcs/telegraf.conf /etc/telegraf/telegraf.conf
WORKDIR /root/
RUN adduser --disabled-password admin
RUN echo "admin:password" | chpasswd

View File

@ -2,20 +2,17 @@ FROM alpine
RUN sleep 10
RUN apk update
RUN apk add openssl
RUN apk add nginx
RUN apk add php7
RUN apk add php7-fpm
RUN apk add php7-mysqli
RUN apk add php7-gd
RUN apk add php7-mbstring
RUN apk add php7-curl
RUN apk add php7-json
RUN apk add php7-xml
RUN apk add php7-zip
RUN apk add telegraf
RUN apk add php
RUN apk add php-fpm
RUN apk add php-mysqli
RUN apk add php-gd
RUN apk add php-mbstring
RUN apk add php-curl
RUN apk add php-json
RUN apk add php-xml
RUN apk add php-zip
COPY srcs/start.sh /root/start.sh
COPY srcs/nginx.conf /etc/nginx/nginx.conf
COPY srcs/telegraf.conf /etc/telegraf/telegraf.conf
COPY srcs/wordpress.conf /var/www/wordpress/wp-config.php
WORKDIR /root/
RUN wget https://wordpress.org/latest.tar.gz