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
| sudo add-apt-repository ppa:webupd8team/java -y | |
| sudo apt install oracle-java8-installer |
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
| wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add - | |
| sudo apt-add-repository "deb http://pkg.jenkins-ci.org/debian binary/" | |
| sudo apt install jenkins -y |
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
| sudo add-apt-repository ppa:certbot/certbot | |
| sudo apt install -y nginx python-certbot-nginx |
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
| upstream jenkins { | |
| server 127.0.0.1:8080 fail_timeout=0; | |
| } | |
| server { | |
| listen 80 default_server; | |
| listen [::]:80 default_server; | |
| root /var/www/html; | |
| index index.html index.htm index.nginx-debian.html; |
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
| sudo nginx -t | |
| sudo systemctl restart nginx | |
| sudo certbot --nginx -d jenkins.example.com |
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
| import { TypeOrmModule } from '@nestjs/typeorm'; | |
| import { Config } from '../shared/config/config'; | |
| import * as appRootPath from 'app-root-path'; | |
| import * as path from 'path'; | |
| export const databaseConnections = [ | |
| TypeOrmModule.forRoot({ | |
| type: 'postgres', | |
| host: Config.get.databases.main.host, | |
| port: Config.get.databases.main.port, |
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
| import { TypeOrmModule } from '@nestjs/typeorm'; | |
| import { databaseConnections } from './database-connections'; | |
| import { Module } from '@nestjs/common'; | |
| @Module({ | |
| imports: [ | |
| ...databaseConnections | |
| ], | |
| exports: [ | |
| ...databaseConnections |
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
| import { Injectable } from '@nestjs/common'; | |
| import { InjectRepository } from '@nestjs/typeorm'; | |
| import { User } from 'modules/shared/entities/user.entity'; | |
| import { Repository } from 'typeorm'; | |
| @Injectable() | |
| export class UserService { | |
| constructor( | |
| @InjectRepository(User) | |
| private readonly userRepository: Repository<User> |
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
| import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm'; | |
| @Entity() | |
| export class User { | |
| @PrimaryGeneratedColumn() | |
| id: number; | |
| @Column({ length: 255 }) | |
| name: string; |
OlderNewer