added readme instructions to run docker without sudo && added V_USER rule in makefile to get name of the user from shell
This commit is contained in:
8
Makefile
8
Makefile
@@ -24,9 +24,9 @@ RESET = "\e[0m"
|
|||||||
|
|
||||||
COMPOSE = ./srcs/docker-compose.yml
|
COMPOSE = ./srcs/docker-compose.yml
|
||||||
|
|
||||||
USER = lenovo
|
V_USER = $(shell echo $(USER))
|
||||||
VOLUMES_D = /home/$(USER)/data/wp_volume \
|
VOLUMES_D = /home/$(V_USER)/data/wp_volume \
|
||||||
/home/$(USER)/data/db_volume
|
/home/$(V_USER)/data/db_volume
|
||||||
|
|
||||||
SUDO =
|
SUDO =
|
||||||
|
|
||||||
@@ -39,7 +39,7 @@ VOLUMES = $(shell $(SUDO) docker volume ls -q)
|
|||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
|
||||||
|
|
||||||
all: build $(VOLUMES_D) up
|
all: build up
|
||||||
|
|
||||||
$(VOLUMES_D):
|
$(VOLUMES_D):
|
||||||
mkdir -p $(VOLUMES_D)
|
mkdir -p $(VOLUMES_D)
|
||||||
|
|||||||
11
README.md
11
README.md
@@ -18,9 +18,8 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
## git next commit
|
## git next commit
|
||||||
- nginx cleaned and works with alpine (45s instead of 180s, 4 times faster)
|
- added readme instruction to run docker without sudo
|
||||||
- in Makefile resolved super-clean rule
|
- added V_USER rule in makefile to get the name of the user from shell
|
||||||
- wordpress and mariadb pbm connections
|
|
||||||
|
|
||||||
---
|
---
|
||||||
## questions
|
## questions
|
||||||
@@ -110,6 +109,11 @@
|
|||||||
- `sudo curl -L "https://github.com/docker/compose/releases/download/v2.10.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose`
|
- `sudo curl -L "https://github.com/docker/compose/releases/download/v2.10.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose`
|
||||||
- `sudo chmod +x /usr/local/bin/docker-compose`
|
- `sudo chmod +x /usr/local/bin/docker-compose`
|
||||||
|
|
||||||
|
###### run docker without sudo on linux (https://docs.docker.com/engine/install/linux-postinstall/)
|
||||||
|
- `sudo groupadd docker`
|
||||||
|
- `sudo usermod -aG docker $USER`
|
||||||
|
- `newgrp docker`
|
||||||
|
|
||||||
###### volumes vs bind mounts :
|
###### volumes vs bind mounts :
|
||||||
- [docker doc: use volumes](https://docs.docker.com/storage/volumes/)
|
- [docker doc: use volumes](https://docs.docker.com/storage/volumes/)
|
||||||
- [docker doc: use bind mounts](https://docs.docker.com/storage/bind-mounts/)
|
- [docker doc: use bind mounts](https://docs.docker.com/storage/bind-mounts/)
|
||||||
@@ -225,4 +229,5 @@ sudo / find -type s
|
|||||||
- [exemple install with composer](https://github.com/aestetype/alpine-wp-cli/blob/master/Dockerfile)
|
- [exemple install with composer](https://github.com/aestetype/alpine-wp-cli/blob/master/Dockerfile)
|
||||||
- [cli commands](https://developer.wordpress.org/cli/commands/)
|
- [cli commands](https://developer.wordpress.org/cli/commands/)
|
||||||
- [cli install wordpress](https://make.wordpress.org/cli/handbook/how-to-install/)
|
- [cli install wordpress](https://make.wordpress.org/cli/handbook/how-to-install/)
|
||||||
|
- `/wp-admin`
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user