Commit e0c01938 authored by Manuel Herold's avatar Manuel Herold

added build files for automated build support

parent 9f51b022
...@@ -82,15 +82,6 @@ if __name__ == '__main__': ...@@ -82,15 +82,6 @@ if __name__ == '__main__':
print(f"> flutter build web") print(f"> flutter build web")
os.system(f"flutter build web") os.system(f"flutter build web")
print(f"> docker image build -t {image_name} {path}")
exit_val = os.system(f"docker image build -t {image_name} {path}")
if exit_val != 0:
error = exit_val
else:
print(f"> docker push {image_name}")
exit_val = os.system(f"docker push {image_name}")
else:
# copy Dockerfile into root dir to have access to modules folder # copy Dockerfile into root dir to have access to modules folder
shutil.copy2(os.path.join(path, DOCKER_BUILD_NAME), ROOT) shutil.copy2(os.path.join(path, DOCKER_BUILD_NAME), ROOT)
......
FROM nginx:latest FROM nginx:latest
EXPOSE 80 EXPOSE 443
COPY ./src/dashboard/deployment/nginx.conf /etc/nginx/conf.d/default.conf
COPY ./src/dashboard/build/web/ /usr/share/nginx/html/ COPY ./src/dashboard/build/web/ /usr/share/nginx/html/
\ No newline at end of file
apiVersion: v1
kind: Service
metadata:
name: dashboard
spec:
type: LoadBalancer
selector:
app: dashboard
ports:
- name: https
port: 443
targetPort: 443
nodePort: 30469
protocol: TCP
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: dashboard
spec:
replicas: 1
selector:
matchLabels:
app: dashboard
template:
metadata:
labels:
app: dashboard
spec:
containers:
- name: dashboard
image: alexx882/dashboard
ports:
- containerPort: 443
imagePullPolicy: Always
volumeMounts:
- mountPath: /certs
name: articonf
volumes:
- name: articonf
hostPath:
path: /srv/articonf
type: Directory
\ No newline at end of file
server {
listen 443 ssl;
server_name demo;
ssl_certificate /certs/articonf1.crt;
ssl_certificate_key /certs/articonf1.key;
location / {
root /usr/share/nginx/html;
try_files $uri /index.html;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment