Skip to content

ZawadzkiB/env_config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-compose

Change volumes paths to your system path and make sure those paths are added in docker settings

docker-compose - gitlab
volumes:
      - /Users/zawadzkibartek/gitlab/config:/etc/gitlab
      - /Users/zawadzkibartek/gitlab/logs:/var/log/gitlab
      - /Users/zawadzkibartek/gitlab/data:/var/opt/gitlab
docker-compose - jenkins
volumes:
      - /Users/zawadzkibartek/jenkins:/var/jenkins_home
      - /var/run/docker.sock:/var/run/docker.sock
docker-compose - mysql
volumes:
      - /Users/zawadzkibartek/repos/sii/sakila-db:/docker-entrypoint-initdb.d
      - /Users/zawadzkibartek/mysql/datadir:/var/lib/mysql

then run → docker-compose up -d

Screenshot at Sep 25 23 54 06

URLS

GitLab → 127.0.0.1:80

Screenshot at Sep 26 00 13 46

Jenkins → 127.0.0.1:8080

Screenshot at Sep 26 00 14 06

MySQL → jdbc:mysql://localhost:3306/sakila

Screenshot at Sep 26 00 15 14

containers are connected by network aliases so if you would like to connect from jenkins to gitlab you can use alias in url http://gitlab/root/test-1.git instead of localhost or 127.0.0.1

Screenshot at Sep 25 23 57 50

same from gitlab to jenkins and jenkins to mysql and mysql to gitlab

GitLab - scripts

/gitlab_scripts

Install node.js and npm then run npm install on package.json

if you want to create some users in gitlab type:

createUser.js
node gitlab_scripts/creatUser.js '{"name":"user-666"}'
Screenshot at Sep 26 00 06 45

inside createUser.js there is data.token which can be generated in user profile on gitlab and is used to authenticate api requests

createUser.js
let data = {
    'token': 'Z7rs4vnTMgobpthGpYEW',
    'users_url': 'http://localhost/api/v4/users'
};

let userData = {
    'email': 'test-user-api3@mailinator.com',
    'username': 'test-user-api3',
    'name': 'Name',
    'password': 'Password',
    'skype': 'Skype ID',
    'linkedin': 'LinkedIn',
    'twitter': 'Twitter account',
    'website_url': 'Website URL',
    'organization': 'Organization name',
    'projects_limit': 1,
    'extern_uid': '',
    'provider': {},
    'bio': 'api user',
    'skip_confirmation': 'true'
};

password is Password

all this can be changed and upgraded later P.S i can’t java script ;)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors