2020-10-15 12:12:31 -04:00
|
|
|
project: openvpn-web-ui
|
|
|
|
configVersion: 1
|
|
|
|
deploy:
|
|
|
|
helmRelease: "[[ project ]]-[[ env ]]"
|
|
|
|
namespace: "[[ project ]]-[[ env ]]"
|
|
|
|
|
|
|
|
---
|
|
|
|
artifact: backend-builder
|
|
|
|
from: golang:1.14.2-alpine3.11
|
|
|
|
git:
|
|
|
|
- add: /
|
|
|
|
to: /app
|
|
|
|
stageDependencies:
|
|
|
|
install:
|
|
|
|
- "*.go"
|
|
|
|
excludePaths:
|
|
|
|
- .helm
|
|
|
|
- .werf
|
|
|
|
- frontend
|
|
|
|
- werf.yaml
|
|
|
|
- Dockerfile
|
|
|
|
ansible:
|
|
|
|
install:
|
|
|
|
- name: Install packages
|
|
|
|
apk:
|
|
|
|
name:
|
|
|
|
- build-base
|
|
|
|
- gcc
|
|
|
|
- name: Build backend
|
2020-10-29 06:50:19 -04:00
|
|
|
command: go build -ldflags='-extldflags "-static" -s -w' -o openvpn-admin
|
2020-10-15 12:12:31 -04:00
|
|
|
environment:
|
|
|
|
CGO_ENABLED: 0
|
|
|
|
GOOS: linux
|
|
|
|
GOARCH: amd64
|
|
|
|
args:
|
|
|
|
chdir: /app
|
|
|
|
|
|
|
|
---
|
|
|
|
artifact: frontend-builder
|
|
|
|
from: node:14.2-alpine3.11
|
|
|
|
git:
|
|
|
|
- add: /frontend
|
|
|
|
to: /app
|
|
|
|
stageDependencies:
|
|
|
|
install:
|
|
|
|
- "**/*"
|
|
|
|
excludePaths:
|
|
|
|
- Dockerfile
|
|
|
|
- build.sh
|
|
|
|
- werf.yaml
|
|
|
|
ansible:
|
|
|
|
setup:
|
|
|
|
- name: install deps
|
|
|
|
command: npm install
|
|
|
|
args:
|
|
|
|
chdir: /app
|
|
|
|
- name: Build app
|
|
|
|
command: npm run build
|
|
|
|
args:
|
|
|
|
chdir: /app
|
|
|
|
|
|
|
|
---
|
|
|
|
image: openvpn-admin
|
|
|
|
from: alpine:3.11
|
|
|
|
import:
|
|
|
|
- artifact: backend-builder
|
2020-10-29 06:50:19 -04:00
|
|
|
add: /app/openvpn-admin
|
|
|
|
to: /usr/bin/openvpn-admin
|
2020-10-15 12:12:31 -04:00
|
|
|
before: setup
|
|
|
|
- artifact: frontend-builder
|
|
|
|
add: /app/static
|
|
|
|
to: /app/static
|
|
|
|
before: setup
|
2020-10-29 06:50:19 -04:00
|
|
|
git:
|
|
|
|
- add: /client.conf.tpl
|
|
|
|
to: /app/client.conf.tpl
|
|
|
|
stageDependencies:
|
|
|
|
setup:
|
|
|
|
- "*"
|
|
|
|
- add: /ccd.tpl
|
|
|
|
to: /app/ccd.tpl
|
|
|
|
stageDependencies:
|
|
|
|
setup:
|
|
|
|
- "*"
|
2020-10-15 12:12:31 -04:00
|
|
|
ansible:
|
|
|
|
install:
|
|
|
|
- name: Install packages
|
|
|
|
apk:
|
|
|
|
name:
|
|
|
|
- easy-rsa
|
|
|
|
- bash
|
|
|
|
- name: Create symbolic link for easy-rsa
|
|
|
|
file:
|
|
|
|
src: "/usr/share/easy-rsa/easyrsa"
|
|
|
|
dest: "/usr/local/bin/easyrsa"
|
|
|
|
state: link
|
|
|
|
|
|
|
|
---
|
|
|
|
image: openvpn
|
|
|
|
from: alpine:3.11
|
|
|
|
git:
|
2020-10-29 06:50:19 -04:00
|
|
|
- add: /.werffiles/
|
|
|
|
to: /etc/openvpn/setup/
|
2020-10-15 12:12:31 -04:00
|
|
|
stageDependencies:
|
|
|
|
install:
|
|
|
|
- "*"
|
|
|
|
ansible:
|
|
|
|
install:
|
|
|
|
- name: Install packages
|
|
|
|
apk:
|
|
|
|
name:
|
|
|
|
- openvpn
|
|
|
|
- easy-rsa
|
|
|
|
- name: Create symbolic link for easy-rsa
|
|
|
|
file:
|
|
|
|
src: "/usr/share/easy-rsa/easyrsa"
|
|
|
|
dest: "/usr/local/bin/easyrsa"
|
|
|
|
state: link
|
|
|
|
|
|
|
|
|