First stab at `elm-live` / compose deployment
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
80da2b2276
commit
839675d12e
|
@ -0,0 +1,2 @@
|
||||||
|
Dockerfile
|
||||||
|
.git
|
24
.drone.yml
24
.drone.yml
|
@ -2,18 +2,20 @@
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
name: deploy to dev.apps.coopcloud.tech
|
name: deploy to dev.apps.coopcloud.tech
|
||||||
steps:
|
steps:
|
||||||
- name: build
|
- name: build image
|
||||||
image: codesimple/elm:0.19
|
image: plugins/docker
|
||||||
commands:
|
|
||||||
- elm make src/Main.elm --optimize --output=public/dist/elm.compiled.js
|
|
||||||
- name: docker cp deploy
|
|
||||||
image: 3wordchant/docker-cp-deploy:latest
|
|
||||||
settings:
|
settings:
|
||||||
host: swarm.autonomic.zone
|
username:
|
||||||
service: dev_apps_coopcloud_tech
|
from_secret: docker_reg_username
|
||||||
chdir: public
|
password:
|
||||||
source: .
|
from_secret: docker_reg_passwd
|
||||||
dest: /usr/share/nginx/html
|
repo: 3wordchant/abra-apps
|
||||||
|
tags: latest
|
||||||
|
|
||||||
|
- name: deployment
|
||||||
|
image: decentral1se/stack-ssh-deploy:latest
|
||||||
|
settings:
|
||||||
|
stack: dev_apps_coopcloud_tech
|
||||||
deploy_key:
|
deploy_key:
|
||||||
from_secret: drone_ssh_swarm.autonomic.zone
|
from_secret: drone_ssh_swarm.autonomic.zone
|
||||||
trigger:
|
trigger:
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
FROM node:12-alpine
|
||||||
|
|
||||||
|
RUN mkdir /code
|
||||||
|
WORKDIR /code
|
||||||
|
|
||||||
|
RUN apk add curl gzip \
|
||||||
|
--virtual .build-dependencies
|
||||||
|
|
||||||
|
# Install and cache dependencies
|
||||||
|
RUN curl -L -o elm.gz https://github.com/elm/compiler/releases/download/0.19.1/binary-for-linux-64-bit.gz && \
|
||||||
|
gunzip elm.gz && \
|
||||||
|
chmod +x elm && \
|
||||||
|
mv elm /usr/local/bin/
|
||||||
|
|
||||||
|
COPY package*.json /code/
|
||||||
|
|
||||||
|
# Install elm-analyse, elm linter, and elm test
|
||||||
|
RUN npm install
|
||||||
|
ENV PATH=$PATH:/code/node_modules/elm-linter/bin:/code/node_modules/elm-format/bin:/code/node_modules/elm-test/bin
|
||||||
|
|
||||||
|
# Add remainder of files
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
ENTRYPOINT ["/usr/local/bin/npm"]
|
|
@ -0,0 +1,28 @@
|
||||||
|
---
|
||||||
|
version: "3.8"
|
||||||
|
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
image: "3wordchant/abra-apps:latest"
|
||||||
|
networks:
|
||||||
|
- proxy
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "curl", "-f", "http://localhost:8000"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 10
|
||||||
|
start_period: 15s
|
||||||
|
deploy:
|
||||||
|
update_config:
|
||||||
|
failure_action: rollback
|
||||||
|
order: start-first
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.services.mkdocs.loadbalancer.server.port=8000"
|
||||||
|
- "traefik.http.routers.mkdocs.rule=Host(`dev.apps.coopcloud.tecg`)"
|
||||||
|
- "traefik.http.routers.mkdocs.entrypoints=web-secure"
|
||||||
|
- "traefik.http.routers.mkdocs.tls.certresolver=production"
|
||||||
|
|
||||||
|
networks:
|
||||||
|
proxy:
|
||||||
|
external: true
|
|
@ -1,9 +1,10 @@
|
||||||
{
|
{
|
||||||
"name": "our-elm-spa-app",
|
"name": "abra-apps",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "A project created with elm-spa",
|
"description": "Co-op Cloud app catalogue",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "npm install && npm run build:dev && npm run dev",
|
"start": "npm install && npm run build:dev && npm run dev",
|
||||||
|
"prod": "npm install && npm run build && npm run serve",
|
||||||
"test": "elm-test",
|
"test": "elm-test",
|
||||||
"test:watch": "elm-test --watch",
|
"test:watch": "elm-test --watch",
|
||||||
"build": "run-s build:elm-spa build:elm",
|
"build": "run-s build:elm-spa build:elm",
|
||||||
|
@ -12,7 +13,8 @@
|
||||||
"build:elm": "elm make src/Main.elm --optimize --output=public/dist/elm.compiled.js",
|
"build:elm": "elm make src/Main.elm --optimize --output=public/dist/elm.compiled.js",
|
||||||
"build:dev:elm": "elm make src/Main.elm --debug --output=public/dist/elm.compiled.js || true",
|
"build:dev:elm": "elm make src/Main.elm --debug --output=public/dist/elm.compiled.js || true",
|
||||||
"build:elm-spa": "elm-spa build .",
|
"build:elm-spa": "elm-spa build .",
|
||||||
"dev:elm": "elm-live src/Main.elm -u -d public -- --debug --output=public/dist/elm.compiled.js",
|
"serve": "elm-live src/Main.elm -u -d public -h 0.0.0.0 -- --output=public/dist/elm.compiled.js",
|
||||||
|
"dev:elm": "elm-live src/Main.elm -u -d public -h 0.0.0.0 -- --debug --output=public/dist/elm.compiled.js",
|
||||||
"dev:elm-spa": "chokidar src/Pages -c \"elm-spa build .\""
|
"dev:elm-spa": "chokidar src/Pages -c \"elm-spa build .\""
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
|
|
Loading…
Reference in New Issue