Skip to content

Instantly share code, notes, and snippets.

Avatar

Nebojsha Todorovikj Todorovikj

View GitHub Profile
@Todorovikj
Todorovikj / playbook.yml
Created Aug 9, 2020
Restart docker-compose f1
View playbook.yml
- 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
@Todorovikj
Todorovikj / playbook.yml
Created Aug 9, 2020
Setup Jeknins for f1
View playbook.yml
- name: Setup jenkins directories
hosts: azure-server
become: true
tasks:
- name: Create jenkins_home directory
file:
path: /var/jenkins_home
state: directory
mode: 1000
@Todorovikj
Todorovikj / playbook.yml
Last active Aug 9, 2020
Copy files ansible f1
View playbook.yml
- name: Copy project files
hosts: azure-server
become: true
tasks:
- name: Create project directory
file:
path: /home/AnIS
state: directory
@Todorovikj
Todorovikj / playbook.yml
Created Aug 9, 2020
Ansible install required packages f1
View playbook.yml
- 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}}"
View ansible.cfg
[defaults]
inventory = hosts
remote_user = neco
host_key_checking = False
[ssh_connection]
ssh_args = -o ControlMaster=auto -o ControlPersist=60s -o ForwardAgent=yes
View docker-compose
version: '3'
networks:
f1_app:
services:
f1-backend:
image: "todorovikj/f1_backend"
ports:
- "8080:8080"
@Todorovikj
Todorovikj / global.conf
Created Aug 9, 2020
Nginx global conf f1
View global.conf
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;
@Todorovikj
Todorovikj / global.conf
Created Aug 9, 2020
Nginx front-end f1 conf
View global.conf
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;
@Todorovikj
Todorovikj / Dockerfile
Created Aug 9, 2020
Dockerfile for backend of f1
View Dockerfile
FROM openjdk:8-jdk-alpine
LABEL maintainer="nebojshatodorovivik@yahoo.com"
RUN mkdir /home/myApp
VOLUME ["/home/myApp"]
WORKDIR /home/myApp
EXPOSE 8080
@Todorovikj
Todorovikj / Dockerfile
Created Aug 9, 2020
Jenkins Docker file
View Dockerfile
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
You can’t perform that action at this time.