This file contains 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
- name: Restart docker-compose containers | |
hosts: azure-server | |
become: true | |
tasks: | |
- name: Stop docker compose | |
command: chdir=/home/AnIS docker-compose stop | |
- name: Start docker compose | |
command: chdir=/home/AnIS docker-compose up -d |
This file contains 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
- name: Setup jenkins directories | |
hosts: azure-server | |
become: true | |
tasks: | |
- name: Create jenkins_home directory | |
file: | |
path: /var/jenkins_home | |
state: directory | |
mode: 1000 |
This file contains 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
- name: Copy project files | |
hosts: azure-server | |
become: true | |
tasks: | |
- name: Create project directory | |
file: | |
path: /home/AnIS | |
state: directory |
This file contains 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
- name: Install required packages | |
hosts: azure-server | |
become: true | |
tasks: | |
- name: install docker | |
apt: name=docker update_cache=true | |
- name: install docker-compose | |
get_url: | |
url: "https://github.com/docker/compose/releases/download/1.26.0/docker-compose-{{ansible_system}}-{{ansible_architecture}}" |
This file contains 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
[defaults] | |
inventory = hosts | |
remote_user = neco | |
host_key_checking = False | |
[ssh_connection] | |
ssh_args = -o ControlMaster=auto -o ControlPersist=60s -o ForwardAgent=yes |
This file contains 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
version: '3' | |
networks: | |
f1_app: | |
services: | |
f1-backend: | |
image: "todorovikj/f1_backend" | |
ports: | |
- "8080:8080" |
This file contains 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
server { | |
listen 0.0.0.0:80; | |
server_name f1; | |
access_log /var/log/nginx/default_access.log; | |
error_log /var/log/nginx/default_error.log; | |
gzip on; |
This file contains 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
server { | |
listen 0.0.0.0:4200; | |
server_name f1-angular; | |
index index.html index.htm; | |
access_log /var/log/nginx/default_access.log; | |
error_log /var/log/nginx/default_error.log; | |
root /usr/share/nginx/html; |
This file contains 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 openjdk:8-jdk-alpine | |
LABEL maintainer="nebojshatodorovivik@yahoo.com" | |
RUN mkdir /home/myApp | |
VOLUME ["/home/myApp"] | |
WORKDIR /home/myApp | |
EXPOSE 8080 |
This file contains 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 jenkins/jenkins:lts | |
LABEL maintainer="nebojshatodorovivik@yahoo.com" | |
ENV REFRESHED_AT 2020-19-05 | |
USER root | |
RUN apt-get -qqy update; apt-get install -qqy sudo | |
RUN echo "jenkins ALL=NOPASSWD: ALL" >> /etc/sudoers | |
RUN wget http://get.docker.com/builds/Linux/x86_64/docker-latest.tgz | |
RUN tar -xvzf docker-latest.tgz | |
RUN mv docker/* /usr/bin/ | |
USER jenkins |