Запуск¶
Запуск с помощью Docker Compose¶
-
Создайте файл docker-compose.yml.
version: '3.9' services: postgresql: image: postgres:13 container_name: postgresql volumes: - ./postgresql/data:/var/lib/postgresql/data networks: - gitlab-net environment: - POSTGRES_PASSWORD=jnfam6d8ePKIbnKE - POSTGRES_DB=appseccode - TZ=Europe/Moscow security_opt: - no-new-privileges restart: always tmpfs: - /tmp gitlab: image: docker.swordfishsecurity.com/appseccode/appseccode:latest hostname: 'YOUR_DOMAIN' container_name: appseccode networks: - gitlab-net restart: always environment: GITLAB_SKIP_UNMIGRATED_DATA_CHECK: "true" LANG: "ru_RU.UTF-8" GITLAB_OMNIBUS_CONFIG: | external_url 'https://YOUR_DOMAIN' gitlab_rails['initial_root_password'] = '58Be4EAwEDa4IU78' nginx['redirect_http_to_https'] = true nginx['ssl_certificate'] = '/etc/gitlab/ssl/fullchain1.pem' nginx['ssl_certificate_key'] = '/etc/gitlab/ssl/privkey1.pem' \# Disable the bundled Omnibus provided PostgreSQL postgresql['enable'] = false \# PostgreSQL connection details gitlab_rails['db_adapter'] = 'postgresql' gitlab_rails['db_encoding'] = 'utf8' gitlab_rails['db_host'] = 'postgresql' # IP/hostname of database server gitlab_rails['db_username'] = "postgres" gitlab_rails['db_password'] = 'jnfam6d8ePKIbnKE' gitlab_rails['db_database'] = "appseccode" letsencrypt['enable'] = false gitlab_rails['gitlab_shell_ssh_port'] = 2222 gitlab_rails['registry_enabled'] = true gitlab_rails['registry_api_url'] = "https://YOUR_DOMAIN:8090" gitlab_rails['registry_issuer'] = "gitlab-issuer" registry['enable'] = true registry_external_url 'https://YOUR_DOMAIN:8090' registry_nginx['enable'] = true registry_nginx['proxy_set_headers'] = { "Host" => "$$http_host", "X-Real-IP" => "$$remote_addr", "X-Forwarded-For" => "$$proxy_add_x_forwarded_for", "X-Forwarded-Proto" => "https", "X-Forwarded-Ssl" => "on" } registry_nginx['ssl_certificate'] = '/etc/gitlab/ssl/fullchain1.pem' registry_nginx['ssl_certificate_key'] = '/etc/gitlab/ssl/privkey1.pem' registry_nginx['listen_port'] = 8090 registry_nginx['server_name'] = 'registry' gitlab_rails['registry_host'] = 'YOUR_DOMAIN' depends_on: - postgresql ports: - '80:80' - '443:443' - '2222:22' - '8090:8090' volumes: - './gitlab/config/ssl:/etc/gitlab/ssl' - './gitlab/config/etc:/etc/gitlab/' - './gitlab/logs:/var/log/gitlab' - './gitlab/data:/var/opt/gitlab' shm_size: '256m' networks: gitlab-net: driver: bridge ipam: driver: default config: - subnet: 172.20.0.0/24
Примечание
В файле docker-compose.yml вместо переменной
YOUR_DOMAIN
укажите свой доменный адрес/IP-адрес. -
Перейдя в директорию, в которой располагается файл docker-compose.yml и запустите Систему.
rootlessenv docker compose up -d