-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathskaffold.yaml
69 lines (69 loc) · 2.25 KB
/
skaffold.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
apiVersion: skaffold/v4beta5
kind: Config
metadata:
name: skaffold-config
profiles:
- name: db-only
manifests:
rawYaml:
# otherwise it complains about the namespace not existing
- kubernetes/local/namespace.yml
kustomize:
paths:
- kubernetes/local/postgres
deploy:
kubectl: {}
kubeContext: minikube
- name: local-dev
# we don't want to waste time building for the `skaffold run -p db-only` pipeline
# but the way to work around this is to default every _other_ command to this profile
# https://skaffold.dev/docs/environment/profiles/#activation
activation:
- command: build
- command: deploy
- command: dev
- command: delete
- command: render
build:
artifacts:
- image: libraries-wagtail
# Portal uses the custom cmd below which lets them have a DEVBUILD switch
# in their build process, that might be useful
# custom:
# buildCommand: docker build --network host --build-arg DEVBUILD=true -t $IMAGE .
sync:
# https://skaffold.dev/docs/pipeline-stages/filesync/
# we use "manual" and not "infer" because infer does not work with our multi-stage Docker build:
# "For multi-stage Dockerfiles, Skaffold only examines the last stage. Use manual sync rules to
# sync file copies from other stages."
# Sync dest is relative to image WORKDIR but we need it to be /app or things are synced 1 level too deep
manual:
- src: libraries/**/*.py
dest: /app
- src: libraries/**/templates/**/*.html
dest: /app
# we have to sync SASS files too, even though they're not needed on the app container,
# or else changes to them trigger a rebuild
- src: libraries/**/*.scss
dest: /app
- src: libraries/**/*.css
dest: /app
- src: libraries/**/*.js
dest: /app
- src: libraries/**/fonts/*
dest: /app
- src: libraries/libraries/static/images/*
dest: /app
- src: libraries/**/*.md
dest: /app
docker:
dockerfile: Dockerfile
manifests:
kustomize:
paths:
- kubernetes/local
portForward:
- resourceType: service
resourceName: libraries
namespace: libraries-wagtail
port: 8000