Skip to content

nessergio/1c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

1C Enterprise 8.3 Dockerized Server

This project provides a Docker-based deployment solution for 1C Enterprise Server 8.3.11 with PostgreSQL Pro 15.1 database backend.

Table of Contents

Overview

This Docker Compose setup creates a complete 1C Enterprise infrastructure with:

  • 1C Enterprise Server 8.3.11
  • PostgreSQL Pro 15.1 (optimized for 1C)
  • Persistent data volumes
  • Proper network isolation

Components

1C Enterprise Server (srv1v83)

  • Base Image: CentOS 7
  • Version: 1C Enterprise 8.3.11-2924
  • Components Installed:
    • 1C Enterprise common files
    • 1C Enterprise server
    • 1C Enterprise web services
    • National language support (NLS) packages

PostgreSQL Pro Database (db)

  • Base Image: CentOS 7
  • Version: PostgreSQL Pro 15.1-3
  • Locale: Ukrainian (uk_UA.UTF-8) with English messages
  • Components:
    • PostgreSQL Pro server
    • PostgreSQL Pro contrib modules
    • PostgreSQL Pro libraries

Prerequisites

  • Docker Engine 20.10 or later
  • Docker Compose 1.29 or later
  • Minimum 4GB RAM
  • At least 10GB free disk space
  • Valid 1C Enterprise license file (.lic)

Project Structure

.
├── docker-compose.yml          # Main orchestration file
├── .env.example                # Environment variables template
├── .gitignore                  # Git ignore rules
├── data/                       # 1C Server data (mount point)
│   └── [LICENSE FILES HERE]    # Place your .lic files here
├── 1csrv/                      # 1C Server Docker build
│   ├── Dockerfile
│   └── install/                # 1C Enterprise RPM packages
│       ├── 1C_Enterprise83-common-8.3.11-2924.x86_64.rpm
│       ├── 1C_Enterprise83-common-nls-8.3.11-2924.x86_64.rpm
│       ├── 1C_Enterprise83-server-8.3.11-2924.x86_64.rpm
│       ├── 1C_Enterprise83-server-nls-8.3.11-2924.x86_64.rpm
│       ├── 1C_Enterprise83-ws-8.3.11-2924.x86_64.rpm
│       └── 1C_Enterprise83-ws-nls-8.3.11-2924.x86_64.rpm
└── pg/                         # PostgreSQL Pro Docker build
    ├── Dockerfile
    ├── docker-compose.yml      # Standalone Postgres (optional)
    ├── data/                   # PostgreSQL data (mount point)
    └── install/
        ├── entrypoint.sh       # Database initialization script
        ├── pg_hba.conf         # Client authentication config
        ├── postgresql.conf     # PostgreSQL configuration
        ├── postgresql15-1c-15.1-3.el7.x86_64.rpm
        ├── postgresql15-1c-contrib-15.1-3.el7.x86_64.rpm
        ├── postgresql15-1c-libs-15.1-3.el7.x86_64.rpm
        └── postgresql15-1c-server-15.1-3.el7.x86_64.rpm

Installation

1. Clone or Download the Project

git clone <repository-url>
cd 1c

2. Download Required 1C Server Package

IMPORTANT: You need to manually download and place the following file:

1csrv/install/1C_Enterprise83-server-8.3.11-2924.x86_64.rpm

This file is not included in the repository and must be obtained from the official 1C distribution or your 1C license provider.

Download the file and place it in the 1csrv/install/ directory before building the Docker images.

3. Configure Environment Variables

cp .env.example .env

Edit .env and set your PostgreSQL credentials:

POSTGRES_USER=postgres
POSTGRES_PASSWORD=your_secure_password
POSTGRES_DB=1cdb

IMPORTANT: Change the default password in production!

4. Place License Files

CRITICAL STEP: 1C Enterprise requires a valid license to operate.

Copy your 1C Enterprise license file(s) (.lic) to the data/ directory:

cp /path/to/your/license.lic ./data/

License File Location:

  • Host path: ./data/*.lic
  • Container path: /home/usr1cv8/.1cv8/1C/1cv8/*.lic

Without a valid license file, the 1C Server will not function properly.

5. Build and Start Services

Build the Docker images from source:

docker-compose build

Start the services:

docker-compose up -d

Check the status:

docker-compose ps

License Configuration

License File Requirements

  1. File Format: .lic extension
  2. Location: Must be placed in ./data/ directory before starting the server
  3. Validity: Ensure your license is valid and not expired
  4. Permissions: The license file should be readable by the container user

Verifying License Installation

After starting the containers, verify the license is recognized:

# Check 1C Server logs
docker logs 1c-server

# Connect to the container and verify license location
docker exec -it 1c-server ls -la /home/usr1cv8/.1cv8/1C/1cv8/

Multiple Licenses

If you have multiple license files, place all of them in the ./data/ directory:

./data/
├── server_license.lic
├── client_license.lic
└── additional_license.lic

Configuration

PostgreSQL Configuration

PostgreSQL Pro is configured with the following defaults:

  • Port: 5432
  • User: postgres (configurable via .env)
  • Database: 1cdb (configurable via .env)
  • Locale: uk_UA.UTF-8
  • Authentication: Trust for local connections (modify pg/install/pg_hba.conf for production)

To modify PostgreSQL settings, edit:

  • pg/install/postgresql.conf - Server configuration
  • pg/install/pg_hba.conf - Client authentication

1C Server Ports

The following ports are exposed:

  • 1540-1541: Cluster manager and main server ports
  • 1560-1591: Working process ports

Usage

Starting the Environment

# Start all services
docker-compose up -d

# View logs
docker-compose logs -f

# View specific service logs
docker-compose logs -f srv1v83
docker-compose logs -f db

Stopping the Environment

# Stop services
docker-compose stop

# Stop and remove containers (data is preserved)
docker-compose down

# Stop and remove containers and volumes (WARNING: deletes data)
docker-compose down -v

Connecting to 1C Server

Use 1C Enterprise client applications to connect to:

  • Server: <docker-host-ip>:1540 or localhost:1540
  • Server Name: 1c-server (hostname)

Accessing PostgreSQL

# Connect using psql from host
psql -h localhost -U postgres -d 1cdb

# Connect from 1C Server container
docker exec -it 1c-postgres /usr/pgsql-15/bin/psql -U postgres -d 1cdb

Running PostgreSQL Standalone

If you only need the PostgreSQL Pro database:

cd pg
docker-compose up -d

Networking

The setup uses a custom bridge network (1c-network) for container communication.

Internal Hostnames

  • 1C Server: 1c-server (srv1v83)
  • PostgreSQL: postgres (db)

Database Connection from 1C

When configuring 1C infobases, use:

  • Server: postgres
  • Port: 5432
  • Database: As configured in .env (default: 1cdb)
  • User: As configured in .env (default: postgres)
  • Password: As configured in .env

Troubleshooting

1C Server Fails to Start

Check logs:

docker logs 1c-server

Common issues:

  1. Missing license file: Ensure .lic file is in ./data/ directory
  2. Invalid license: Verify license is valid and not expired
  3. Port conflicts: Check if ports 1540-1541, 1560-1591 are available

Database Connection Issues

Check PostgreSQL is running:

docker-compose ps db
docker logs 1c-postgres

Test connectivity:

# From host
nc -zv localhost 5432

# From 1C container
docker exec -it 1c-server ping postgres

Permission Issues

Fix data directory permissions:

# Ensure data directory exists and is writable
chmod 755 data/
chmod 644 data/*.lic

Rebuilding Images

If you need to rebuild after changes:

# Rebuild specific service
docker-compose build srv1v83
docker-compose build db

# Rebuild all services
docker-compose build --no-cache

# Rebuild and restart
docker-compose up -d --build

Viewing Container Details

# Inspect container
docker inspect 1c-server
docker inspect 1c-postgres

# Execute shell in container
docker exec -it 1c-server /bin/bash
docker exec -it 1c-postgres /bin/bash

# Check resource usage
docker stats

Database Initialization Issues

If the database fails to initialize:

# Remove PostgreSQL data and reinitialize
docker-compose down
sudo rm -rf pg/data/*
docker-compose up -d

Security Considerations

  1. Change default passwords: Always modify the default PostgreSQL password in production
  2. Network security: Restrict port exposure using firewall rules
  3. Authentication: Configure pg_hba.conf for production use (avoid 'trust' authentication)
  4. License security: Keep license files secure and backed up
  5. Updates: Regularly update packages for security patches

Backup and Maintenance

Backing Up 1C Data

# Backup data directory (includes licenses)
tar -czf 1c-data-backup-$(date +%Y%m%d).tar.gz data/

Backing Up PostgreSQL

# Backup all databases
docker exec 1c-postgres /usr/pgsql-15/bin/pg_dumpall -U postgres > backup-$(date +%Y%m%d).sql

# Backup specific database
docker exec 1c-postgres /usr/pgsql-15/bin/pg_dump -U postgres 1cdb > 1cdb-backup-$(date +%Y%m%d).sql

Restoring PostgreSQL

# Restore from backup
cat backup-20241214.sql | docker exec -i 1c-postgres /usr/pgsql-15/bin/psql -U postgres

Version Information

  • 1C Enterprise: 8.3.11-2924
  • PostgreSQL Pro: 15.1-3
  • Base OS: CentOS 7
  • Docker Compose: Version 3

Support and Resources

License

This Docker configuration is provided as-is. 1C Enterprise and PostgreSQL Pro are subject to their respective licenses. You must provide your own valid 1C Enterprise license to use this software.

About

1C Enterprise 8.3 Dockerization

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published