bla
This commit is contained in:
parent
ba9e246176
commit
91c7952d63
2
Makefile
2
Makefile
@ -12,4 +12,4 @@ down:
|
||||
|
||||
clean: down
|
||||
yes | sudo docker system prune -a
|
||||
rm -rf ~/data ./build
|
||||
sudo rm -rf ./data ./build
|
||||
|
16
Readme.md
16
Readme.md
@ -3,23 +3,29 @@ nginx reverse proxy TLS 1.3 and 1.2 Only..
|
||||
Wordpress served by php-fpm with 1 admin and 1 user and redis cache
|
||||
Mariadb
|
||||
FTP Server pointing to the wordpress volume
|
||||
Adminer
|
||||
Redis
|
||||
|
||||
# PID 1
|
||||
init: true
|
||||
|
||||
# /etc/hosts
|
||||
127.0.0.1 djonker.42.fr
|
||||
|
||||
# Volumes
|
||||
all in /home/user/data
|
||||
mariadb database
|
||||
wordpress html
|
||||
|
||||
# Read about
|
||||
PID1 > use bash as pid1 the first process, and user it to spawn the target service so orphans get adopted.
|
||||
# Variables
|
||||
.env
|
||||
|
||||
# Adminer
|
||||
create dockerfile
|
||||
|
||||
# Redis
|
||||
create dockerfile
|
||||
|
||||
# Website
|
||||
I need to create a simple html website.
|
||||
copy simple website from nextcloud
|
||||
|
||||
# Extra service
|
||||
Nextcloud?
|
||||
|
@ -2,15 +2,13 @@ version: '3'
|
||||
|
||||
services:
|
||||
nginx:
|
||||
build: ./srcs/requirements/nginx
|
||||
build: ./requirements/nginx
|
||||
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
|
||||
- /etc/letsencrypt/:/etc/letsencrypt/
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- ../data/nginx/config:/etc/nginx
|
||||
- ../data/nginx/log/error.log:/var/log/error.log
|
||||
- ../data/nginx/log/access.log:/var/log/access.log
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
@ -18,24 +16,22 @@ services:
|
||||
wordpress:
|
||||
ipv4_address: 172.20.30.10
|
||||
mariadb:
|
||||
build: ./srcs/requirements/mariadb
|
||||
build: ./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
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- ../data/mariadb/data:/var/lib/mysql
|
||||
- ../data/mariadb/config:/etc/mysql/conf.d
|
||||
- ../data/mariadb/logs:/var/log/mysql
|
||||
networks:
|
||||
wordpress:
|
||||
ipv4_address: 172.20.30.20
|
||||
wordpress:
|
||||
build: ./srcs/requirements/wordpress
|
||||
build: ./requirements/wordpress
|
||||
container_name: wordpress
|
||||
restart: always
|
||||
volumes:
|
||||
- ~/data/wordpress:/var/www
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- ../data/wordpress:/var/www
|
||||
networks:
|
||||
wordpress:
|
||||
ipv4_address: 172.20.30.30
|
||||
|
@ -3,7 +3,6 @@ RUN sleep 10
|
||||
RUN apk update
|
||||
RUN apk add mariadb
|
||||
RUN apk add mariadb-client
|
||||
RUN apk add telegraf
|
||||
COPY srcs/start.sh /root/start.sh
|
||||
COPY srcs/my.cnf /etc/my.cnf.d/mariadb-server.cnf
|
||||
COPY srcs/maria.sql /root/maria.sql
|
||||
|
@ -1,5 +1,4 @@
|
||||
#!/bin/sh
|
||||
telegraf &
|
||||
if cat /var/lib/mysql/initialized
|
||||
then
|
||||
touch /var/lib/mysql/initialized
|
||||
|
@ -1,10 +1,8 @@
|
||||
FROM alpine
|
||||
RUN sleep 10
|
||||
RUN apk update
|
||||
RUN apk add openssh
|
||||
RUN apk add openssl
|
||||
RUN apk add nginx
|
||||
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
|
||||
@ -17,8 +15,6 @@ RUN openssl x509 -req -days 365 -in nginx.csr -signkey nginx.key -out nginx.crt
|
||||
RUN mv nginx.crt /etc/ssl/certs/nginx.crt
|
||||
RUN mv nginx.key /etc/ssl/private/nginx.key
|
||||
RUN chmod 600 /etc/ssl/certs/nginx.crt /etc/ssl/private/nginx.key
|
||||
RUN ssh-keygen -A
|
||||
CMD sh start.sh
|
||||
EXPOSE 80/tcp
|
||||
EXPOSE 443/tcp
|
||||
EXPOSE 22/tcp
|
||||
|
@ -1,4 +1,2 @@
|
||||
#!/bin/sh
|
||||
/usr/sbin/sshd
|
||||
telegraf &
|
||||
nginx -g 'daemon off;'
|
||||
|
@ -12,7 +12,6 @@ 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/wordpress.conf /var/www/wordpress/wp-config.php
|
||||
WORKDIR /root/
|
||||
RUN wget https://wordpress.org/latest.tar.gz
|
||||
|
@ -1,4 +1,2 @@
|
||||
#!/bin/sh
|
||||
telegraf &
|
||||
php-fpm7 &
|
||||
nginx -g 'daemon off;'
|
||||
php-fpm
|
||||
|
Loading…
Reference in New Issue
Block a user