Compare commits
No commits in common. "d45d1ad56f96fa1572c66d425d3b38f57c2a5704" and "cad579e7596364ca01431836b83e7d6364b8f0cc" have entirely different histories.
d45d1ad56f
...
cad579e759
9 changed files with 26 additions and 115 deletions
|
@ -1,2 +0,0 @@
|
|||
.git
|
||||
.dockerignore
|
|
@ -1 +0,0 @@
|
|||
VITE_API_URL=https://psp.dets.ch/api
|
|
@ -1,53 +0,0 @@
|
|||
stages:
|
||||
- build
|
||||
- deploy
|
||||
|
||||
variables:
|
||||
PY_COLORS: '1'
|
||||
ANSIBLE_FORCE_COLOR: '1'
|
||||
ANSIBLE_PYTHON_INTERPRETER: auto_silent
|
||||
ANSIBLE_STDOUT_CALLBACK: debug
|
||||
|
||||
docker-build-master:
|
||||
# Official docker image.
|
||||
image: docker:latest
|
||||
stage: build
|
||||
tags:
|
||||
- docker
|
||||
services:
|
||||
- docker:dind
|
||||
before_script:
|
||||
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
|
||||
script:
|
||||
- docker build --pull -t "$CI_REGISTRY_IMAGE" .
|
||||
- docker push "$CI_REGISTRY_IMAGE"
|
||||
only:
|
||||
- master
|
||||
|
||||
docker-build:
|
||||
# Official docker image.
|
||||
image: docker:latest
|
||||
stage: build
|
||||
tags:
|
||||
- docker
|
||||
services:
|
||||
- docker:dind
|
||||
before_script:
|
||||
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
|
||||
script:
|
||||
- docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" .
|
||||
- docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
|
||||
except:
|
||||
- main
|
||||
|
||||
deploy-master:
|
||||
#when: manual
|
||||
stage: deploy
|
||||
image:
|
||||
name: cytopia/ansible:latest-tools
|
||||
entrypoint: [""]
|
||||
script:
|
||||
- chmod 600 "${ANSIBLE_SSH_KEY_PRIVATE}"
|
||||
- ansible-playbook -i ./deployment/hosts.yml --private-key "${ANSIBLE_SSH_KEY_PRIVATE}" "./deployment/deployment.yml"
|
||||
only:
|
||||
- main
|
12
Dockerfile
12
Dockerfile
|
@ -1,12 +0,0 @@
|
|||
FROM node:alpine as build-stage
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm install
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
# production stage
|
||||
FROM nginx:stable-alpine as production-stage
|
||||
COPY --from=build-stage /app/dist /usr/share/nginx/html
|
||||
EXPOSE 80
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
27
README.md
27
README.md
|
@ -1,4 +1,27 @@
|
|||
# Radiator-Web
|
||||
# Vue 3 + Typescript + Vite
|
||||
|
||||
API URL must be set on Build Time, either via Env `API_URL`(prefered), or via `VITE_API_URL` from [`.env.production`](.env.production)
|
||||
This template should help get you started developing with Vue 3 and Typescript in Vite.
|
||||
|
||||
## Recommended IDE Setup
|
||||
|
||||
[VSCode](https://code.visualstudio.com/) + [Vetur](https://marketplace.visualstudio.com/items?itemName=octref.vetur). Make sure to enable `vetur.experimental.templateInterpolationService` in settings!
|
||||
|
||||
### If Using `<script setup>`
|
||||
|
||||
[`<script setup>`](https://github.com/vuejs/rfcs/pull/227) is a feature that is currently in RFC stage. To get proper IDE support for the syntax, use [Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar) instead of Vetur (and disable Vetur).
|
||||
|
||||
## Type Support For `.vue` Imports in TS
|
||||
|
||||
Since TypeScript cannot handle type information for `.vue` imports, they are shimmed to be a generic Vue component type by default. In most cases this is fine if you don't really care about component prop types outside of templates. However, if you wish to get actual prop types in `.vue` imports (for example to get props validation when using manual `h(...)` calls), you can use the following:
|
||||
|
||||
### If Using Volar
|
||||
|
||||
Run `Volar: Switch TS Plugin on/off` from VSCode command palette.
|
||||
|
||||
### If Using Vetur
|
||||
|
||||
1. Install and add `@vuedx/typescript-plugin-vue` to the [plugins section](https://www.typescriptlang.org/tsconfig#plugins) in `tsconfig.json`
|
||||
2. Delete `src/shims-vue.d.ts` as it is no longer needed to provide module info to Typescript
|
||||
3. Open `src/main.ts` in VSCode
|
||||
4. Open the VSCode command palette
|
||||
5. Search and run "Select TypeScript version" -> "Use workspace version"
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
---
|
||||
- hosts: snickers-docker
|
||||
gather_facts: no
|
||||
vars:
|
||||
verbose: false
|
||||
compose_folder: "/mnt/docker-storage/radiator-web/"
|
||||
|
||||
tasks:
|
||||
- name: Ensures {{ compose_folder }} dir exists
|
||||
stat:
|
||||
path: "{{ compose_folder }}docker-compose.yml"
|
||||
register: file_details
|
||||
|
||||
- name: Fail if docker-compose file doesn't exist
|
||||
fail:
|
||||
msg: "docker-compose.yml doesn't exist in expected location (expected in {{ compose_folder }})"
|
||||
when: not file_details.stat.exists
|
||||
|
||||
- name: Update container image
|
||||
community.general.docker_compose:
|
||||
project_src: "{{ compose_folder }}"
|
||||
pull: yes
|
|
@ -1,10 +0,0 @@
|
|||
all:
|
||||
vars:
|
||||
ansible_python_interpreter: /usr/bin/python3
|
||||
hosts:
|
||||
snickers-docker:
|
||||
ansible_host: 192.168.200.11
|
||||
ansible_port: 22
|
||||
ansible_user: root
|
||||
ansible_ssh_extra_args: '-o StrictHostKeyChecking=no'
|
||||
ansible_ssh_common_args: '-o ProxyCommand="ssh -o StrictHostKeyChecking=no -i "${ANSIBLE_SSH_KEY_PRIVATE}" -W %h:%p root@vserver8.alex-detsch.de -p 52"'
|
|
@ -1,12 +0,0 @@
|
|||
web:
|
||||
image: registry.alex-detsch.de/fem/radiator/radiator-web
|
||||
restart: always
|
||||
healthcheck:
|
||||
test: "curl localhost"
|
||||
interval: "60s"
|
||||
timeout: "3s"
|
||||
start_period: "5s"
|
||||
retries: 3
|
||||
stop_grace_period: 3s
|
||||
ports:
|
||||
- "1499:80"
|
|
@ -16,7 +16,7 @@ const enum HTTPMethod {
|
|||
PATCH = "PATCH",
|
||||
}
|
||||
|
||||
const url = import.meta.env.API_URL ?? import.meta.env.VITE_API_URL;
|
||||
const url = "http://192.168.178.5:8080/api";
|
||||
let token: token;
|
||||
let ready = false;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue