start docker with postgres version,but get http 500 error when try to access web page.
Root Cause
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
error log: xwiki-error.log (33.3 KB)
steps:
- docker network create -d bridge xwiki-nw --subnet=10.0.2.0/24
- docker run --net=xwiki-nw --name postgres-xwiki --ip 10.0.2.2 -p 7432:5432 -m 512m -e POSTGRES_PASSWORD=my-password -v /usr/var/xwiki/postgres:/var/lib/postgresql/data -d postgres:10-alpine
- manually create user & db in postgres
CREATE DATABASE xwiki
WITH
OWNER = xwiki
ENCODING = ‘UTF8’
LC_COLLATE = ‘en_US.utf8’
LC_CTYPE = ‘en_US.utf8’
TABLESPACE = pg_default
CONNECTION LIMIT = -1;
- docker run --net=xwiki-nw --name xwiki -d --ip 10.0.2.3 -p 80:8080 -v /usr/var/xwiki/xwiki-data:/usr/local/xwiki -e DB_USER=xwiki -e DB_PASSWORD=my-password2 -e DB_DATABASE=xwiki -e DB_HOST=postgres-xwiki xwiki:stable-postgres-tomcat