Updates to dockerfile

This commit is contained in:
vesem 2021-08-06 06:48:42 -04:00
parent 20ff4b4a44
commit 73e40980de
2 changed files with 20 additions and 20 deletions

16
Jenkinsfile vendored
View File

@ -34,18 +34,18 @@ node {
archiveArtifacts artifacts: '**/target/*.jar', fingerprint: true
}
stage("Prepare for containerizing") {
withCredentials([file(credentialsId: 'privatekey', variable: 'privateKey'),
file(credentialsId: 'publickey', variable: 'publicKey')]){
sh "cp \$privateKey ./"
sh "cp \$publicKey ./"
}
}
// stage("Prepare for containerizing") {
// withCredentials([file(credentialsId: 'privatekey', variable: 'privateKey'),
// file(credentialsId: 'publickey', variable: 'publicKey')]){
// sh "cp \$privateKey ./"
// sh "cp \$publicKey ./"
// }
// }
stage("Run docker compose") {
sh "docker-compose build"
withCredentials([usernamePassword(credentialsId: 'doApi', passwordVariable: 'doApi', usernameVariable: '')]) {
sh "docker login -u \$doApi -p \$doApi registry.digitalocean.com"
sh "docker push registry.digitalocean.com/nerdfortress/crusadetracker_nginx"
// sh "docker push registry.digitalocean.com/nerdfortress/crusadetracker_nginx"
sh "docker push registry.digitalocean.com/nerdfortress/crusadetracker"
}
}

View File

@ -1,17 +1,17 @@
version: '2'
services:
nginx:
restart: always
build:
context: .
dockerfile: nginx.dockerfile
image: registry.digitalocean.com/nerdfortress/crusadetracker_nginx
expose:
- '80'
- '443'
ports:
- '80:80'
- '443:443'
# nginx:
# restart: always
# build:
# context: .
# dockerfile: nginx.dockerfile
# image: registry.digitalocean.com/nerdfortress/crusadetracker_nginx
# expose:
# - '80'
# - '443'
# ports:
# - '80:80'
# - '443:443'
crusadetracker-app:
restart: always
container_name: crusadetracker