Skip to main content
Altcraft Docs LogoAltcraft Docs Logo
User guideDeveloper guideAdmin guide
Company siteHelp center
English
  • Русский
  • English
v73
  • v74
  • v73
  • v72
Login
  • Getting Started
  • Administrator documentation
  • Functional characteristics
  • Technology description
  • System requirements
  • Admin Panel
  • Platform installation
    • Automatic installation
    • Manual installation
    • Running the platform in a Docker container
  • Platform configuration
  • Platform maintenance
  • Custom channels guide
  • Extra
  • Processing HTTP/HTTPS traffic
  • Administrator API
This is documentation for Altcraft Platform v73. This documentation is no longer maintained.
The information for up-to-date platform version at this page is available (v74).
  • Platform installation
  • Running the platform in a Docker container
Documentation for version v73

Running the platform in a Docker container

The Altcraft image is a monolithic image that runs all the necessary processes in one container.

note

Databases (MongoDB, SSDB, ClickHouse) and RabbitMQ must be installed separately on the host or in Docker containers.

Installation​

Minimum requirements​

The table contains the minimum software versions that must be installed on the target host to run the platform.

SoftwareVersionDescription
Docker Engine>= 19.03.0See the Docker Engine documentation for installation instructions
Docker Compose>= 1.25.0See the Docker Compose documentation for installation instructions

Volume locations​

The Altcraft container uses volumes to store persistent data. You can customize their location according to your requirements.

Location in Docker containerDescription
/altcraft/account_filesMessage previews and task files (export, import) inside accounts.
By default, an anonymous volume will be used.
/altcraft/dataTemporary files, storage and cache of various jobs
/altcraft/logsLogs
Note: the output of logs to the STDOUT of the container is configured by the LOG_STDOUT environment variable. Set it to true if you need it.

Minimal main.json configuration​

Before starting the platform, you need to configure the minimum configuration $ALTCRAFT_HOME/config/main.json. Configuration example:

caution

Please generate a stronger password. Do not use abcdefghijklmnopqrstuvwxyzABCDEF from the example.

{
"BASEDIR": "/altcraft",
"DEFAULT_LOG_LEVEL": "WARN",

"WEBAPI_PRIVATE_KEY": "abcdefghijklmnopqrstuvwxyzABCDEF",
"WEBCONTROL_HOSTNAME": "altcraft.example.com",
"WEBCONTROL_PUBLIC_IP": "0.0.0.0",
"WEBCONTROL_PUBLIC_PORT": 8080,

"TRACKING_CRYPT_KEY": "abcdefghijklmnopqrstuvwxyzABCDEF",
"TRACKING_PREFIX": "click",
"TRACKING_PUBLIC_IP": "0.0.0.0",
"TRACKING_PUBLIC_PORT": 8085,

"COOKIESAVER_PUBLIC_HOSTNAME": "pixel.altcraft.example.com",
"COOKIESAVER_PUBLIC_IP": "0.0.0.0",
"COOKIESAVER_PUBLIC_PORT": 8090,
"COOKIESAVER_SSL_ON": false,

"CONTROLDB_IP": "192.168.20.1",
"CONTROLDB_NAME": "control",
"CONTROLDB_PASS": "abcdefghijklmnopqrstuvwxyzABCDEF",
"CONTROLDB_PORT": 27017,
"CONTROLDB_USER": "altcraft",

"CLICKHOUSE_SYSTEM": {
"HOST": "192.168.20.1",
"PORT": 9000,
"USER": "altcraft",
"MAX_CONNECTION": 100,
"CONN_TIMEOUT": 15,
"PASSWORD": "abcdefghijklmnopqrstuvwxyzABCDEF",
"IS_DEBUG": false
},

"RABBITMQ_HOST": "192.168.20.1",
"RABBITMQ_PASS": "abcdefghijklmnopqrstuvwxyzABCDEF",
"RABBITMQ_USER": "altcraft",

"SSDB_HBSUPP_IP": "192.168.20.1",
"SSDB_HBSUPP_PASS": "abcdefghijklmnopqrstuvwxyzABCDEF",
"SSDB_HBSUPP_PORT": 4420,

"SSDB_NOTIFY_IP": "192.168.20.1",
"SSDB_NOTIFY_PASS": "abcdefghijklmnopqrstuvwxyzABCDEF",
"SSDB_NOTIFY_PORT": 4430,

"PRIVATE_KEY": "abcdefghijklmnopqrstuvwxyzABCDEF",
"PRODUCT_NAME": "Altcraft Marketing Platform",

"NOREPLY_MAILER": {
"server": "mail.example.com",
"port": 587,
"email": "altcraft@example.com",
"login": "altcraft@example.com",
"pass": "abcdefghijklmnopqrstuvwxyzABCDEF"
}
}

Running the platform using Docker Engine​

After preparing the directories according to your requirements, you can run the image:

sudo docker run --detach \
--name altcraft \
--publish <WEBCONTROL_PUBLIC_PORT>:<WEBCONTROL_PUBLIC_PORT> \
--publish <TRACKING_PUBLIC_PORT>:<TRACKING_PUBLIC_PORT> \
--publish <COOKIESAVER_PUBLIC_PORT>:<COOKIESAVER_PUBLIC_PORT> \
--volume $ALTCRAFT_HOME/config/main.json:/altcraft/config/main.json \
--restart always \
altcraft:<TAG>

If you are using SELinux, run this instead:

sudo docker run --detach \
--name altcraft \
--publish <WEBCONTROL_PUBLIC_PORT>:<WEBCONTROL_PUBLIC_PORT> \
--publish <TRACKING_PUBLIC_PORT>:<TRACKING_PUBLIC_PORT> \
--publish <COOKIESAVER_PUBLIC_PORT>:<COOKIESAVER_PUBLIC_PORT> \
--volume $ALTCRAFT_HOME/config/main.json:/altcraft/config/main.json:Z \
--restart always \
altcraft:<TAG>

This will ensure that the Docker process has sufficient rights to create files on the mounted volumes.

Optional: If you want to collect logs from the container's STDOUT, set the LOG_STDOUT environment variable to true.

sudo docker run --detach \
--name altcraft \
--publish <WEBCONTROL_PUBLIC_PORT>:<WEBCONTROL_PUBLIC_PORT> \
--publish <TRACKING_PUBLIC_PORT>:<TRACKING_PUBLIC_PORT> \
--publish <COOKIESAVER_PUBLIC_PORT>:<COOKIESAVER_PUBLIC_PORT> \
--volume $ALTCRAFT_HOME/config/main.json:/altcraft/config/main.json:Z \
--env LOG_STDOUT=true \
--restart always \
altcraft:<TAG>

Running the platform using Docker Compose​

  1. Install Docker Compose following the instructions from the minimum requirements section.

  2. Prepare docker-compose.yml file, example:

version: '3.4'

services:
altcraft:
image: altcraft:<TAG>
container_name: altcraft
restart: always
environment:
- GIN_MODE=release
- LOG_STDOUT=true
volumes:
- /opt/altcraft/account_files:/altcraft/account_files:Z
- /opt/altcraft/data:/altcraft/data:Z
- /opt/altcraft/logs:/altcraft/logs:Z
- /opt/altcraft/config/main.json:/altcraft/config/main.json:Z
networks:
altcraft:
aliases:
- altcraft
ulimits:
nofile:
soft: 256000
hard: 256000
expose:
- <WEBCONTROL_PUBLIC_PORT>
- <TRACKING_PUBLIC_PORT>
- <COOKIESAVER_PUBLIC_PORT>
ports:
- <WEBCONTROL_PUBLIC_PORT>:<WEBCONTROL_PUBLIC_PORT>
- <TRACKING_PUBLIC_PORT>:<TRACKING_PUBLIC_PORT>
- <COOKIESAVER_PUBLIC_PORT>:<COOKIESAVER_PUBLIC_PORT>

networks:
altcraft:
driver: bridge
  1. Run Altcraft Platform:
sudo docker-compose up --detach

Changing main.json configuration​

After making the necessary changes, you must restart the container to reconfigure Altcraft Platform:

sudo docker restart altcraft

Update​

Update using Docker Engine​

  1. Download the new version of the image:
sudo docker load --input altcraft*.tar.gz
  1. Remove the existing container:
sudo docker rm altcraft
  1. Create the container again with the parameters specified earlier:
sudo docker run --detach \
--name altcraft \
--publish <WEBCONTROL_PUBLIC_PORT>:<WEBCONTROL_PUBLIC_PORT> \
--publish <TRACKING_PUBLIC_PORT>:<TRACKING_PUBLIC_PORT> \
--publish <COOKIESAVER_PUBLIC_PORT>:<COOKIESAVER_PUBLIC_PORT> \
--volume $ALTCRAFT_HOME/config/main.json:/altcraft/config/main.json:Z \
--restart always \
altcraft:<NEW_TAG>

Update using Docker Compose​

  1. Download the new version of the image:
sudo docker load --input altcraft*.tar.gz
  1. Remove the previous container:
sudo docker-compose down
  1. In the docker-compose.yml file set the new version of the image:
version: '3.4'

services: altcraft:
image: altcraft:<NEW_TAG>
container_name: altcraft
...

  1. Restart Altcraft Platform:
sudo docker-compose up --detach
Last updated on Jun 26, 2020
Previous
Manual installation
Next
Platform configuration
  • Installation
    • Minimum requirements
    • Volume locations
    • Minimal main.json configuration
    • Running the platform using Docker Engine
    • Running the platform using Docker Compose
    • Changing main.json configuration
  • Update
    • Update using Docker Engine
    • Update using Docker Compose
© 2015 - 2025 Altcraft, LLC. All rights reserved.