feat: create docker files for deployment
This commit is contained in:
parent
a0a8ebdfa6
commit
e2be83ce24
12
Jenkinsfile
vendored
12
Jenkinsfile
vendored
@ -1,7 +1,7 @@
|
||||
pipeline {
|
||||
agent {
|
||||
docker {
|
||||
image 'golang:1.23'
|
||||
image 'golang:1.23-alpine'
|
||||
}
|
||||
}
|
||||
stages {
|
||||
@ -15,14 +15,12 @@ agent {
|
||||
sh 'go build main.go'
|
||||
}
|
||||
}
|
||||
stage('???') {
|
||||
steps {
|
||||
sh 'echo "TODO: call docker compose up"'
|
||||
}
|
||||
}
|
||||
stage('Profit') {
|
||||
steps {
|
||||
sh 'echo "done"'
|
||||
dir('docker') {
|
||||
sh 'docker compose stop || true'
|
||||
sh 'docker compose up --build -d'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
7
docker/Dockerfile
Normal file
7
docker/Dockerfile
Normal file
@ -0,0 +1,7 @@
|
||||
FROM alpine:3
|
||||
|
||||
COPY ../main .
|
||||
COPY ../public .
|
||||
|
||||
CMD ["main"]
|
||||
|
9
docker/docker-compose.yml
Normal file
9
docker/docker-compose.yml
Normal file
@ -0,0 +1,9 @@
|
||||
services:
|
||||
dev.araozu.music:
|
||||
container_name: music-to-go
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- "8007:8007"
|
||||
restart: unless-stopped
|
Loading…
Reference in New Issue
Block a user