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
version: "3.8" | |
services: | |
dogs: | |
image: registry.gitlab.com/m6093/server-b/dogs | |
cats: | |
image: registry.gitlab.com/m6093/server-c/cats |
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
services: | |
- name: registry.gitlab.com/m6093/server-c/cats | |
alias: cats | |
- name: registry.gitlab.com/m6093/server-b/dogs | |
alias: dogs |
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 { | |
Controller, | |
Get, | |
Head, | |
HttpService | |
} from "@nestjs/common"; | |
@Controller() | |
export class PetsController { | |
constructor(private readonly httpService: HttpService) {} |
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
version: "3.8" | |
services: | |
server: | |
build: ./ | |
command: sh -c "npm run start:debug" | |
ports: | |
- 3000:3000 | |
volumes: | |
- ./src:/home/usr/app/src | |
environment: |
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 request from "supertest"; | |
describe("pets (e2e)", () => { | |
const req = request("http://localhost:3000"); | |
const cats = [{ | |
name: "meow", | |
age: 1, | |
breed: "cat", | |
}]; |
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
cache: | |
key: ${CI_COMMIT_REF_SLUG} | |
paths: | |
- node_modules/ | |
- .npm/ | |
default: | |
image: node:16.9.0 | |
variables: |
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
$ npx nest start & | |
$ npx wait-on --httpTimeout 5000 http://localhost:3000/health | |
[Nest] 58 - 11/27/2021, 6:38:44 PM [NestFactory] Starting Nest application... | |
[Nest] 58 - 11/27/2021, 6:38:44 PM [InstanceLoader] HttpModule dependencies initialized +47ms | |
[Nest] 58 - 11/27/2021, 6:38:44 PM [InstanceLoader] PetsModule dependencies initialized +1ms | |
[Nest] 58 - 11/27/2021, 6:38:44 PM [RoutesResolver] PetsController {}: +6ms | |
[Nest] 58 - 11/27/2021, 6:38:44 PM [RouterExplorer] Mapped {/cats, GET} route +3ms | |
[Nest] 58 - 11/27/2021, 6:38:44 PM [RouterExplorer] Mapped {/dogs, GET} route +1ms | |
[Nest] 58 - 11/27/2021, 6:38:44 PM [RouterExplorer] Mapped {/health, HEAD} route +1ms | |
[Nest] 58 - 11/27/2021, 6:38:44 PM [NestApplication] Nest application successfully started +2ms |
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
build: | |
script: | |
- echo 'building development' | |
environment: development | |
except: | |
- /^release.*$/ | |
- master | |
build:acc: | |
script: |
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
.build: | |
script: | |
- echo $ENVIRONMENT | |
build: | |
extends: .build | |
environment: development | |
variables: | |
ENVIRONMENT: development | |
except: |
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 alpine | |
ARG ENVIRONMENT | |
ENV ENVIRONMENT ${ENVIRONMENT} | |
CMD echo ${ENVIRONMENT} |