A sys-admin project for setting up some containerized web services/hosting.
The LAMP stack is what we are asked to do:
- Linux for the os
- Enginx for the webserver
- Mariadb for the database
- PHP for dynamic processing
This readme is, a dump of some personal notes and links.
- installing LEMP stack
- docker command
- setting up SSL on docker
- another ssl link
- really good ssl link, i think
- extension of above link with the correct section
- -sub explication
- marai-db
- wordpress to php-fmp
- unix socket vs tcp socker
- pid 1 and best practive containers
- launch the vm
- connect with ssh:
ssh znichola@localhost -p2222
- pull the prject and cd into it
- run:
make
- after install open browser to
znichola@42.fr
to see wp site make <containter name>
to docker exec into the container to poke aroundmake data-clean
to compeltly while all files on diskmake fclean
to remove all containers and docker bitssudo make data-clean && make re
to wipe everything and start again from scratch
Add port forwarding to the vmbox
admir 8080 8080
ssh 2222 22
svelte-deploy 4200 4200
svelte-dev 5173 5173
wordpress 442 443 - this won't work when browsing becuase on mac we don't have access to hosts
To show the mariadb database is setup correctly
-- to see the different database there are
SHOW DATABASES;
-- select a db to use
USE wordpress;
-- to show the varous tables there are in the db
SHOW TABES;
-- to see the various colum names in the table
DESCRIBE wp_comments;
-- to select data to be displayed
SELECT comment_author, comment_content FROM wp_comments;
-- or to see everything in a table;
SELECT * FROM wp_users;
ftp commands
make info
# ip adresses for the containers and env passwords
ftp -p <wordpress ip>
ftp> ls
# uploads the makefile from the local files
ftp> put Makefile
# the ! tells ftp to run a local command, in this case ls
ftp> !ls