You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.9 KiB
59 lines
1.9 KiB
2 years ago
|
# Inception
|
||
|
|
||
|
Projet 42:
|
||
|
Sujet: Conteneuriser un serveur web qui hebergera wordpress localement à l'aide de docker, alpine/debian, nginx et mariadb
|
||
|
|
||
|
## Todo:
|
||
|
- add login/register/admin buttons in wordpress
|
||
|
## Instructions:
|
||
|
|
||
|
### Setup it:
|
||
|
Create a `.env` file in `srcs` folder with settings you want.
|
||
|
e.g:
|
||
|
```
|
||
|
DOMAIN=narnaud.42.fr
|
||
|
#DOMAIN=localhost
|
||
|
|
||
|
WP_TITLE=Inception
|
||
|
WP_ADMIN_USR=theboss
|
||
|
WP_ADMIN_PWD= ***
|
||
|
WP_ADMIN_EMAIL=theboss@mail.com
|
||
|
WP_USR=narnaud
|
||
|
WP_PWD= ***
|
||
|
WP_EMAIL=narnaud@student.42nice.fr
|
||
|
|
||
|
MYSQL_ROOT_PWD= ***
|
||
|
WP_DATABASE_NAME=wordpressdb
|
||
|
WP_DATABASE_USR=wordpress
|
||
|
WP_DATABASE_PWD= ***
|
||
|
GITEA_DATABASE_NAME=giteadb
|
||
|
GITEA_DATABASE_USR=gitea
|
||
|
GITEA_DATABASE_PWD= ***
|
||
|
|
||
|
GITEA_ADMIN_USR=theboss
|
||
|
GITEA_ADMIN_PWD= ***
|
||
|
GITEA_ADMIN_MAIL=theboss@mail.com
|
||
|
|
||
|
FTP_USR=ftpuser
|
||
|
FTP_PWD= **
|
||
|
```
|
||
|
|
||
|
### Start it:
|
||
|
If you want to use a custom domain as local host, modify the Makefile DOMAIN variable and `make domain`.
|
||
|
To custom static page content, just edit `srcs/bonus/hexo/*_conf.yml` files with what you what to use before build.
|
||
|
`make` to build and start.
|
||
|
`make clean` to cleanup unused datas.
|
||
|
`make fclean` to wipe all.
|
||
|
`sudo make wipe` to wipe all servers datas.
|
||
|
|
||
|
### Use it:
|
||
|
For acces to homepage, visit `localhost` or your domain url (`DOMAIN_URL`) from your browser.
|
||
|
You can access all services except ftp server from the homepage.
|
||
|
To access ftp, connect using ftp://FTP_USER@localhost:21 and the FTP_PWD with your favourite ftp client.
|
||
|
|
||
|
### Static publishing:
|
||
|
To publish some content to the static homepage:
|
||
|
- first create a new article file either from the `~/data/www/html/source/_post` or using the hexo container command `hexo n post TITLE`.
|
||
|
You can access hexo container cli using `docker compose run hexo sh` command.
|
||
|
- Once you have fullfilled the new file with the content you want, you can either `hexo generate` if you still in the container cli or just launch the container without custom parameters.
|