This commit is contained in:
23
.drone.yml
23
.drone.yml
@@ -11,13 +11,13 @@ steps:
|
||||
- go test ./...
|
||||
|
||||
- name: build and push docker image
|
||||
image: docker:24
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run/docker.sock
|
||||
commands:
|
||||
- docker build -t localhost:5000/link-shortener:latest -f dockerfile .
|
||||
- docker push localhost:5000/link-shortener:latest
|
||||
image: plugins/docker
|
||||
settings:
|
||||
repo: localhost:5000/link-shortener
|
||||
tags: latest
|
||||
dockerfile: dockerfile
|
||||
registry: localhost:5000
|
||||
insecure: true
|
||||
|
||||
- name: deploy with compose
|
||||
image: docker:24
|
||||
@@ -35,7 +35,10 @@ steps:
|
||||
LETSENCRYPT_EMAIL:
|
||||
from_secret: LETSENCRYPT_EMAIL
|
||||
SERVER_PORT: 8080
|
||||
REDIS_URL: redis://redis:6379
|
||||
REDIS_PASSWORD:
|
||||
from_secret: REDIS_PASSWORD
|
||||
REDIS_URL:
|
||||
from_secret: REDIS_URL
|
||||
commands:
|
||||
- apk add --no-cache docker-cli-compose
|
||||
- cp -r . /opt/app
|
||||
@@ -49,8 +52,8 @@ volumes:
|
||||
path: /var/run/docker.sock
|
||||
- name: appdir
|
||||
host:
|
||||
path: /tmp/drone-app-deploy
|
||||
path: /opt/drone/link-shortener
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- main
|
||||
- main
|
||||
|
||||
Reference in New Issue
Block a user