mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-23 05:01:04 +01:00
Implemented draft four roulette wheel
This commit is contained in:
parent
aa64256207
commit
ddb71f504b
@ -151,6 +151,14 @@
|
|||||||
vars:
|
vars:
|
||||||
domain: funkwhale.{{top_domain}}
|
domain: funkwhale.{{top_domain}}
|
||||||
http_port: 8012
|
http_port: 8012
|
||||||
|
- name: setup roulette-wheel hosts
|
||||||
|
hosts: roulette_wheel_hosts
|
||||||
|
become: true
|
||||||
|
roles:
|
||||||
|
- role: docker-roulette-wheel
|
||||||
|
vars:
|
||||||
|
domain: roulette.{{top_domain}}
|
||||||
|
http_port: 8013
|
||||||
- name: setup akaunting hosts
|
- name: setup akaunting hosts
|
||||||
hosts: akaunting_hosts
|
hosts: akaunting_hosts
|
||||||
become: true
|
become: true
|
||||||
|
8
roles/docker-roulette-wheel/handlers/main.yml
Normal file
8
roles/docker-roulette-wheel/handlers/main.yml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
- name: setup roulette-wheel
|
||||||
|
command:
|
||||||
|
cmd: docker-compose -p roulette-wheel up -d --force-recreate
|
||||||
|
chdir: "{{docker_compose_path}}"
|
||||||
|
environment:
|
||||||
|
COMPOSE_HTTP_TIMEOUT: 600
|
||||||
|
DOCKER_CLIENT_TIMEOUT: 600
|
2
roles/docker-roulette-wheel/meta/main.yml
Normal file
2
roles/docker-roulette-wheel/meta/main.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
dependencies:
|
||||||
|
- native-docker-reverse-proxy
|
7
roles/docker-roulette-wheel/readme.md
Normal file
7
roles/docker-roulette-wheel/readme.md
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# docker roulette-wheel
|
||||||
|
|
||||||
|
## further information
|
||||||
|
- https://github.com/p-wojt/roulette-wheel
|
||||||
|
- https://dev.to/ms314006/how-to-package-front-end-projects-into-docker-images-and-use-it-with-webpack-go3
|
||||||
|
- https://stackoverflow.com/questions/53178820/dockerfile-to-run-nodejs-static-content-in-docker-container
|
||||||
|
- https://stackoverflow.com/questions/43619644/i-am-getting-an-invalid-host-header-message-when-connecting-to-webpack-dev-ser
|
41
roles/docker-roulette-wheel/tasks/main.yml
Normal file
41
roles/docker-roulette-wheel/tasks/main.yml
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
---
|
||||||
|
- name: recieve {{domain}} certificate
|
||||||
|
command: certbot certonly --agree-tos --email {{administrator_email}} --non-interactive --webroot -w /var/lib/letsencrypt/ -d {{domain}}
|
||||||
|
|
||||||
|
- name: configure {{domain}}.conf
|
||||||
|
template: src=roles/native-docker-reverse-proxy/templates/domain.conf.j2 dest=/etc/nginx/conf.d/{{domain}}.conf
|
||||||
|
notify: restart nginx
|
||||||
|
|
||||||
|
- name: "create {{docker_compose_path}}"
|
||||||
|
file:
|
||||||
|
path: "{{docker_compose_path}}"
|
||||||
|
state: directory
|
||||||
|
mode: 0755
|
||||||
|
|
||||||
|
#- name: register directory
|
||||||
|
# stat:
|
||||||
|
# path: "{{docker_compose_path}}"
|
||||||
|
# register: docker_compose_path_register
|
||||||
|
#
|
||||||
|
#- name: checkout repository
|
||||||
|
# ansible.builtin.shell: git checkout .
|
||||||
|
# become: true
|
||||||
|
# args:
|
||||||
|
# chdir: "{{docker_compose_path}}"
|
||||||
|
# when: docker_compose_path_register.stat.exists
|
||||||
|
|
||||||
|
- name: pull app repository
|
||||||
|
git:
|
||||||
|
repo: "https://github.com/p-wojt/roulette-wheel.git"
|
||||||
|
dest: "{{app_path}}"
|
||||||
|
update: yes
|
||||||
|
notify: setup roulette-wheel
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: add docker-compose.yml
|
||||||
|
template: src=docker-compose.yml.j2 dest={{docker_compose_path}}docker-compose.yml
|
||||||
|
notify: setup roulette-wheel
|
||||||
|
|
||||||
|
- name: add Dockerfile
|
||||||
|
template: src=Dockerfile.j2 dest={{docker_compose_path}}Dockerfile
|
||||||
|
notify: setup roulette-wheel
|
8
roles/docker-roulette-wheel/templates/Dockerfile.j2
Normal file
8
roles/docker-roulette-wheel/templates/Dockerfile.j2
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
FROM node:latest
|
||||||
|
WORKDIR /app
|
||||||
|
COPY {{app_path}}package.json ./
|
||||||
|
RUN npm install
|
||||||
|
COPY {{app_path}} ./
|
||||||
|
RUN npm run build
|
||||||
|
EXPOSE 8080
|
||||||
|
CMD ["npm", "run", "start"]
|
@ -0,0 +1,9 @@
|
|||||||
|
version: '3.7'
|
||||||
|
services:
|
||||||
|
application:
|
||||||
|
container_name: application
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
ports:
|
||||||
|
- 127.0.0.1:{{http_port}}:8080
|
||||||
|
restart: unless-stopped
|
2
roles/docker-roulette-wheel/vars/main.yml
Normal file
2
roles/docker-roulette-wheel/vars/main.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
docker_compose_path: "/home/administrator/docker-compose/roulette-wheel/"
|
||||||
|
app_path: "/home/administrator/docker-compose/roulette-wheel/app"
|
Loading…
Reference in New Issue
Block a user