-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.project.yaml
83 lines (83 loc) · 2.57 KB
/
.project.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# yaml-language-server: $schema=https://raw.githubusercontent.com/dhhyi/devcontainer-creator/dist/language_schema.json
extends: dcc://elm
devcontainer:
build:
packages:
- nginx
root:
- >-
RUN wget https://github.com/soulteary/nginx-formatter/releases/download/v1.1.1/nginx-formatter_1.1.1_linux_amd64.tar.gz -O /tmp/nginx-formatter.tar.gz &&
tar -xvf /tmp/nginx-formatter.tar.gz -C /tmp &&
mv /tmp/nginx-formatter /usr/local/bin/nginx-formatter &&
rm /tmp/nginx-formatter.tar.gz
- RUN rm -rf /etc/nginx/sites-enabled/default && chmod -R 777 /usr/share/nginx/html
publish:
image: ghcr.io/dhhyi/recipe-db-devcontainer-images-edit
labels:
org.opencontainers.image.source: https://github.com/dhhyi/recipe-db
ports:
- 80
environment:
TESTING: "true"
initialize: |
sudo ln -sf ${containerWorkspaceFolder}/nginx.conf /etc/nginx/conf.d/default.conf
sudo ln -sf ${containerWorkspaceFolder}/index.html /usr/share/nginx/html/index.html
sudo /etc/init.d/nginx start
cd ${containerWorkspaceFolder}
npm install
npm run codegen
elm make src/Main.elm --output /usr/share/nginx/html/elm.js
vscode:
settings:
peacock.remoteColor: "#995d51"
filewatcher.commands:
- match: "\\.elm"
cmd: cd ${workspaceRoot} && elm make src/Main.elm --output /usr/share/nginx/html/elm.js
event: onFileChange
- match: "nginx.conf"
cmd: sudo /etc/init.d/nginx reload
event: onFileChange
- match: "\\.graphql"
cmd: cd ${workspaceRoot} && npm run codegen
event: onFolderChange
extensions:
- johnpapa.vscode-peacock
- appulate.filewatcher
- GraphQL.vscode-graphql
extras:
- traefik
- named-volumes
namedVolumes:
$HOME/.elm: recipe-db-images-edit-elm-cache
node_modules: recipe-db-images-edit-node-modules
elm-stuff: recipe-db-images-edit-elm-stuff
traefik:
network: intranet
labels:
http:
services:
recipe-db-images-edit:
loadBalancer:
healthCheck:
interval: 10s
timeout: 1s
path: /health
routers:
images-edit:
rule: PathPrefix(`/images`)
entrypoints: web
---
# yaml-language-server: $schema=../.scripts/project-schema.json
category: frontend
prettier:
ignore:
- "*.elm"
- nginx.conf
- elm.json
precommit: |
nginx-formatter -indent=4
npx prettier --tab-width 4 --print-width 10 --ignore-path /dev/null --write elm.json
elm-format --yes .
npm run codegen
elm make src/Main.elm --output /dev/null
npm run lint