Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(form): new micro service #648

Merged
merged 11 commits into from
Jan 15, 2023
Prev Previous commit
Next Next commit
feat(feat): deploy compose
  • Loading branch information
njfamirm authored and alimd committed Jan 15, 2023
commit ec23b4950e67b69ec5d87f93d4e2b54fd9b93468
100 changes: 100 additions & 0 deletions cloud/classic/soffit-form/compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
networks:
internal:
alwatr-public-network:
name: alwatr-public-network
external: true

services:
storage-server:
image: ghcr.io/alimd/storage-server:${STORAGE_SERVER_VERSION:-next}

cpu_shares: 1024
mem_limit: 256m

stop_grace_period: 30s

# restart: unless-stopped

networks:
internal:
aliases:
- '${APP_ID}-storage-server'

environment:
- STORAGE_PATH=/storage
- ACCESS_TOKEN=${STORAGE_TOKEN}
- ALWATR_DEBUG=${STORAGE_SERVER_DEBUG:-}

volumes:
- type: bind
source: ./_data/storage
target: /storage
bind:
create_host_path: true

logging:
driver: json-file
options:
max-size: '10m'
max-file: '2'

api:
image: ghcr.io/alimd/form:${API_VERSION:-next}

cpu_shares: 1024
mem_limit: 256m

# restart: unless-stopped

networks:
internal:
alwatr-public-network:

depends_on:
- storage-server

environment:
- STORAGE_HOST=${APP_ID}-storage-server
- STORAGE_PORT=80
- STORAGE_NAME=${STORAGE_NAME}
- STORAGE_TOKEN=${STORAGE_TOKEN}
- ACCESS_TOKEN=${API_TOKEN}
- ALWATR_DEBUG=${API_DEBUG:-}

logging:
driver: json-file
options:
max-size: '10m'
max-file: '2'

labels:
traefik.enable: true
traefik.port: 80
traefik.frontend.rule: Host:${API_DOMAIN}
traefik.frontend.entryPoints: http, https
traefik.frontend.redirect.entryPoint: https

# pwa:
# image: ghcr.io/alimd/form-pwa:${PWA_VERSION:-next}

# cpu_shares: 1024
# mem_limit: 256m

# # restart: unless-stopped

# networks:
# alwatr-public-network:

# logging:
# driver: json-file
# options:
# max-size: '10m'
# max-file: '2'

# labels:
# traefik.enable: true
# traefik.port: 80
# traefik.frontend.rule: Host:${PWA_DOMAIN}
# traefik.frontend.entryPoints: http, https
# traefik.frontend.redirect.entryPoint: https
# # traefik.frontend.auth.basic.users: $PWA_AUTH
3 changes: 3 additions & 0 deletions cloud/classic/soffit-form/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

source ../lib/deploy.sh
13 changes: 13 additions & 0 deletions cloud/classic/soffit-form/env/example.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
U2FsdGVkX19/x0riPbP6pToYo1yPFh2XRpxZp7QoTzvdAF9EF3V8CUqdXmrd88Or
skaa6xz3bHAoorjKYsNo7rEW3bBxy9ILFdFjTb9j+C0R2EWqAgncmkQr8GEBMqSq
H2lyv94jCSAAJFzQbts2YOHWUxMi92zsnu+F7d9DI1lX6LMHNV1b3zB9PatipQsx
EfRv1vgcOrOzIOcofa25UNVf3hkHQnzk3Lh4XHlfH2wv4LmALZyi0vSKNzoBWW5e
sdcSQNM+E6kiNdFQdiFz+QZThCKx1NjKUSjTLaLUzkjvRC91yl6zLNwVcB6X8vfA
QInHNdMtbPmTbQ/5O0khoNGR7S1gxpL0aNoQyd2gP22uWJlWbGNZl0+ADV6+2HQz
kXvFPBy/TpKTEAJY+nYcEdwNwbSH89hH2PWx0iErX5w+EpKUkDc18xTjPZEB992n
YDhBmDVwQ3NHaFb/GZn2RJqtYmzBaGSi8otLLH8CDGJbg3t4IRTdC6Yo+sgMNJSX
f3WZOPvWwNiujT97Q1Anvf62p7QksWtkSz/rZYdVxwnawZ1aGrGTRSc+Vjxs3Yt9
alfIdhUDsOT5FnlIZtcaIJiYp+qmJnxibLvLKT3t/QRrps0pqqTfkDlIgeEaa+lr
dQ2afr2wOejIQrwf54sDT/755ibVyF7tk+BX1YrFkSpG/7Hz/qHgJuXMGIKHYwkD
o+LThXy0r1TGAQ4gWOUHbAXudMCTFHmc8ByGf5XXhUKDdHwa78WjgM+DUhOs9Lv4
Ex22GFGBseDgklobcUkiZg==