Jenkins & docker config
This commit is contained in:
parent
10a196533e
commit
e68245273d
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
.env
|
||||
|
||||
# The binary
|
||||
card-jong-be
|
6
Dockerfile
Normal file
6
Dockerfile
Normal file
@ -0,0 +1,6 @@
|
||||
FROM debian:bookworm
|
||||
EXPOSE 8080:8080
|
||||
|
||||
# Copy the backend binary
|
||||
COPY ./card-jong-be .
|
||||
ENTRYPOINT ["card-jong-be"]
|
22
Jenkinsfile
vendored
Normal file
22
Jenkinsfile
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
pipeline {
|
||||
agent any
|
||||
|
||||
stages {
|
||||
stage('Build binary') {
|
||||
agent {
|
||||
docker {
|
||||
image "golang:1.22-bookworm"
|
||||
reuseNode true
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'go build'
|
||||
}
|
||||
}
|
||||
stage("Deploy") {
|
||||
steps {
|
||||
sh "docker compose up --build -d"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
8
docker-compose.yml
Normal file
8
docker-compose.yml
Normal file
@ -0,0 +1,8 @@
|
||||
services:
|
||||
web:
|
||||
container_name: rimajon2-be
|
||||
restart: on-failure
|
||||
build: .
|
||||
ports:
|
||||
- "9126:8080"
|
||||
|
Loading…
Reference in New Issue
Block a user