diff --git a/.drone.yml b/.drone.yml index 806a676..5fd383e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,16 +1,27 @@ --- kind: pipeline type: kubernetes -name: hello-world +name: ssr-deploy steps: - - name: docker + - name: Build Docker Image image: plugins/docker settings: - repo: fascinated/test-image + repo: fascinated/ssr username: from_secret: docker_username password: from_secret: docker_token tags: - latest + + - name: Deploy to Kubernetes + image: quay.io/honestbee/drone-kubernetes + settings: + kubernetes_server: https://10.0.69.162:6443 + kubernetes_token: + from_secret: kubernetes_token + namespace: public-services + deployment: ssr + repo: fascinated/ssr + tag: latest diff --git a/Dockerfile b/Dockerfile index 04f24ab..1dd0306 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,7 +34,7 @@ RUN adduser --system --uid 1001 nextjs RUN mkdir .next RUN chown nextjs:nodejs .next -COPY --from=builder --chown=nextjs:nodejs /app/node_modules ./node_modules +# COPY --from=builder --chown=nextjs:nodejs /app/node_modules ./node_modules COPY --from=builder --chown=nextjs:nodejs /app/.next ./.next COPY --from=builder --chown=nextjs:nodejs /app/public ./public COPY --from=builder --chown=nextjs:nodejs /app/package.json ./package.json diff --git a/deployment.yaml b/deployment.yaml new file mode 100644 index 0000000..c883171 --- /dev/null +++ b/deployment.yaml @@ -0,0 +1,22 @@ +--- +apiVersion: traefik.io/v1alpha1 +kind: IngressRoute +metadata: + name: ssr-staging-ingress + namespace: public-services + annotations: + kubernetes.io/ingress.class: traefik-external +spec: + entryPoints: + - websecure + routes: + - match: Host(`ssr-staging.fascinated.cc`) + kind: Rule + middlewares: + - name: default-headers + namespace: traefik + services: + - name: ssr + port: 80 + tls: + secretName: fascinated-cc