All-In-One solution with mysql database, server(backend API) and client(browser) application.
⚠️ WARNING⚠️ The generated images are for testing purposes only and should not be used in productive way or in public domains! This still applies when the image is build with
--build-arg BUILD_ENV=productionand started with--env ENV=production!
docker build . -t <image-name> --progress=plain
# '--build-arg NODE_VERSION=<version>' - '18'(default), '16' , ...docker build . -t <image-name> --progress=plain --build-arg CMS_GIT_TAG=<tag>
# also append '--build-arg API_GIT_TAG=<tag>' if versions don't matchAdd --build-arg BUILD_ENV=development to install additionial programs
docker pull patrickbauerit/ark-cms-mysql:<tag>See https://hub.docker.com/r/patrickbauerit/ark-cms-mysql/tags for available tags
docker run -p 20-22:20-22 -p 80:80 -p 443:443 -p 3002:3002 -p 3306:3306 -p 4000:4000 -d <image-name-or-id>For example, if latest prebuild should be used:
docker run -p 20-22:20-22 -p 80:80 -p 443:443 -p 3002:3002 -p 3306:3306 -p 4000:4000 -d patrickbauerit/ark-cms-mysqlYou can persist the database in a seperate mount like this:
docker volume create mysql
docker run --name <container-name> \
-p 20-22:20-22 -p 80:80 -p 443:443 -p 3002:3002 -p 3306:3306 -p 4000:4000 \
-v mysql:/var/lib/mysql \
-d <image-name-or-id>When using the internal CDN you can access the files with SCP, FTP or you can start the container with a mounting:
docker run --name <container-name> \
-p 20-22:20-22 -p 80:80 -p 443:443 -p 3002:3002 -p 3306:3306 -p 4000:4000 \
--mount type=bind,source=<host-path>,target=/var/www/html/cdn \
-d <image-name-or-id>Add --env ENV=production to set NODE_ENV
Add --env PROXY=true to map all routes to port 80
Run interactive:
docker run --name <container-name> \
-p 20-22:20-22 -p 80:80 -p 443:443 -p 3002:3002 -p 3306:3306 -p 4000:4000 \
-it <image-name-or-id> /bin/bashor connect to bash or running container
docker run --name <container-name> \
--env TEST=true \
-p 20-22:20-22 -p 80:80 -p 443:443 -p 3002:3002 -p 3306:3306 -p 4000:4000 \
-d <image-name-or-id>docker run --name <container-name> \
--env TEST=true \
-p 20-22:20-22 -p 80:80 -p 443:443 -p 3002:3002 -p 3306:3306 -p 4000:4000 \
-d <image-name-or-id>Error: getaddrinfo ENOTFOUND host.docker.internal
while
host.docker.internalin database-config might work on windows it might fail on linux
use 'localhost'/'172.17.0.1' instead of 'host.docker.internal'
or add
--add-host=host.docker.internal:host-gatewaytodocker runworks starting from major version 20.04 of the docker engine
Tested on Ubuntu 22.10 (5.19.0-26-generic, x86_64) with Docker version 20.10.21