This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| docker run -d --name some-rabbit -p 15672:15672 -p 5672:5672 -e RABBITMQ_DEFAULT_USER=admin -e RABBITMQ_DEFAULT_PASS=admin rabbitmq:3-management |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM nginx | |
| COPY ./docker-env.sh /usr/share/docker-env.sh | |
| RUN chmod +x /usr/share/docker-env.sh | |
| COPY ./custom.nginx.conf /etc/nginx/conf.d/default.conf | |
| COPY dist/project-name /usr/share/nginx/html | |
| ENTRYPOINT ["/bin/sh", "/usr/share/docker-env.sh"] | |
| ## docker-env.sh | |
| #!/bin/bash |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git clone https://name:password@host/project-name.git | |
| cd ./project-name | |
| git checkout $branch | |
| bash ./gradlew clean build | |
| docker build -t registry/project-name . | |
| docker login --username=username --password=password https://registry | |
| docker push registry/project-name:latest | |
| sshpass -p pass ssh -o stricthostkeychecking=no username@stand_host ls | |
| sshpass -p pass ssh intabia@stand_host docker stop project-name | |
| sshpass -p pass ssh intabia@stand_host docker rm project-name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent install | |
| или | |
| mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent org.jacoco:jacoco-maven-plugin:report-aggregate install | |
| mvn sonar:sonar -Dsonar.host.url=<URL> -Dsonar.login=<TOKEN> -Dsonar.projectName=<PROJECT_NAME> -Dsonar.projectVersion=0.0.1 -Djavax.xml.accessExternalSchema=all -Dhttps.protocols=TLSv1.2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| docker run -d --name db -p 5432:5432 | |
| -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=postgres postgres:11 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| docker exec -it container-name bash | |
| apt update | |
| apt install zip mc nano | |
| unzip app.war | |
| nano ./WEB-INF/classes/logback.xml | |
| # через mc удаляем файл из war и подкладываем новый | |
| # выходим и рестартуем контейнер | |
| docker logs container-name -f --tail=100 | |
| # или грепом |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This template will build and test your projects | |
| # * Caches downloaded dependencies and plugins between invocation. | |
| # * Verify but don't deploy merge requests. | |
| # * For master branch push sonar report about app to SonarQube server and deploy docker image of app to docker registry. | |
| variables: | |
| # This will suppress any download for dependencies and plugins or upload messages which would clutter the console log. | |
| # `showDateTime` will show the passed time in milliseconds. You need to specify `--batch-mode` to make this work. | |
| MAVEN_OPTS: "-Dhttps.protocols=TLSv1.2 -Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true" | |
| # As of Maven 3.3.0 instead of this you may define these options in `.mvn/maven.config` so the same config is used |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #/bin/bash | |
| # see Run GitLab Runner in a container https://docs.gitlab.com/runner/install/docker.html | |
| # see Registering Runners https://docs.gitlab.com/runner/register/index.html#docker | |
| # see Docker build inside runners https://docs.gitlab.com/ee/ci/docker/using_docker_build.html | |
| # remove old | |
| docker stop gitlab-runner && docker rm gitlab-runner | |
| # install runner |
NewerOlder