I am using wodby containers for nginx, mariadb and php (docker-compose file included at the end).
Installed Silverstrip 4.5.1 using composer, built database with vendor/bin/sake dev/build.
I used this for the nginx config Nginx webserver configuration
The only things I changed were
root /var/www/html/mysite/public;
server_name localhost;
Looking at the nginx log after curl http://localhost:8080:
docker logs --tail 50 --follow --timestamps silverstripecontainer_nginx_1
I see
2020-03-31T09:42:48.584991369Z 2020/03/31 09:42:48 [error] 33#33: *27 connect() failed (111: Connection refused) while connecting to upstream, client: 172.19.0.1, server: localhost, request: “GET / HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9000”, host: “localhost:8080”
2020-03-31T09:42:48.584992184Z 172.19.0.1 - - [31/Mar/2020:09:42:48 +0000] “GET / HTTP/1.1” 502 3702 “-” “curl/7.69.1”
At first, the base URL was some autogenerated ID, which broke fetching the CSS etc., so I added SS_BASE_URL=“http://localhost:8080” to my .env file. Now the site theme loads, but for the content I only see
Server error
Sorry, there was a problem with handling your request.
Any ideas on what might be wrong?
My docker-compose file:
version: '3.0'
services:
nginx:
image: wodby/nginx:latest
environment:
NGINX_CONF_INCLUDE: sites-enabled/*
volumes:
- ./silverstripe:/var/www/html
- ./mysite.conf:/etc/nginx/sites-enabled/mysite.conf
ports:
- "8080:80"
links:
- mariadb
- php-fpm
restart: "no"
mariadb:
image: wodby/mariadb:latest
environment:
MYSQL_DATABASE: silverstripe
MYSQL_USER: silverstripe
MYSQL_PASSWORD: password
MYSQL_ROOT_PASSWORD: password
volumes:
- ./mariadbdata:/var/lib/mysql
- ./override.cnf:/etc/mysql/conf.d/override.cnf
ports:
- "3306:3306"
restart: "no"
php-fpm:
image: wodby/php:latest
environment:
PHP_MAX_EXECUTION_TIME: 1000
PHP_MEMORY_LIMIT: 4096M
PHP_UPLOAD_MAX_FILESIZE: 4096M
PHP_POST_MAX_SIZE: 4096M
PHP_MAX_INPUT_TIME: 1000
PHP_MAX_INPUT_VARS: 10000
volumes:
- ./silverstripe:/var/www/html
restart: "no"
dns:
- 8.8.8.8
- 4.4.4.4
- 0.0.0.0