「🏗️」 wip: everything should be fixed
This commit is contained in:
@ -50,18 +50,18 @@ func main() {
|
||||
|
||||
makeFpmConf()
|
||||
|
||||
_, err := os.ReadFile("/usr/src/wordpress/wp-config.php")
|
||||
_, err := os.ReadFile("/var/www/html/wp-config.php")
|
||||
|
||||
if err != nil && env.IsEnvSet("WORDPRESS_") {
|
||||
content, err := os.ReadFile("/usr/src/wordpress/wp-config-docker.php")
|
||||
content, err := os.ReadFile("/var/www/html/wp-config-docker.php")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
res := bytes.Replace([]byte(content), []byte("put your unique phrase here"), []byte(pass.GenStrPass(32)), -1)
|
||||
if err := os.WriteFile("/usr/src/wordpress/wp-config.php", res, 0660); err != nil {
|
||||
if err := os.WriteFile("/var/www/html/wp-config.php", res, 0660); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
cmd := exec.Command("chown", "www-data:www-data", "/usr/src/wordpress/wp-config.php")
|
||||
cmd := exec.Command("chown", "www-data:www-data", "/var/www/html/wp-config.php")
|
||||
cmd.Stdout = os.Stdout
|
||||
cmd.Stderr = os.Stderr
|
||||
if err := cmd.Run(); err == nil {
|
||||
|
@ -3,7 +3,7 @@ server {
|
||||
|
||||
server_name adjoly.42.fr www.adjoly.42.fr;
|
||||
|
||||
root /var/www/html/;
|
||||
root /var/www/html;
|
||||
index index.php;
|
||||
|
||||
ssl_certificate $NGINX_SSL_CERT_FILE;
|
||||
@ -14,13 +14,13 @@ server {
|
||||
keepalive_timeout 60;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ =404;
|
||||
try_files $${q}uri $${q}uri/ =404;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
include fastcgi.conf;
|
||||
fastcgi_pass $NGINX_PHP_HOST:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
include fastcgi.conf;
|
||||
}
|
||||
}
|
||||
|
@ -31,8 +31,7 @@ services:
|
||||
- ./configs/nginx/templates:/etc/nginx/templates
|
||||
- ./configs/nginx/entry:/docker-entrypoint.d
|
||||
ports:
|
||||
- "8443:443"
|
||||
- "8080:80"
|
||||
- "443:443"
|
||||
restart: unless-stopped
|
||||
|
||||
wordpress-php:
|
||||
|
@ -12,7 +12,7 @@ COPY cmd /build/cmd
|
||||
COPY internal /build/internal
|
||||
COPY docker/wordpress/www-docker.conf /www-docker.conf
|
||||
|
||||
RUN apk add --no-cache go curl php84-fpm tzdata fcgi \
|
||||
RUN apk add --no-cache go curl php84-mysqli php84-fpm tzdata fcgi \
|
||||
&& cd /build \
|
||||
&& go build git.keyzox.me/42_adjoly/inception/cmd/wordpress/entrypoint \
|
||||
&& cp /build/entrypoint /docker-entrypoint \
|
||||
|
Reference in New Issue
Block a user