This commit is contained in:
Gary Kwok
2024-03-11 12:24:35 +08:00
parent 0530779609
commit f49cfc64d9
5 changed files with 6 additions and 84 deletions

View File

@@ -1,12 +0,0 @@
# 000-default.conf
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/public
<Directory /var/www>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>

View File

@@ -1,13 +0,0 @@
FROM php:7.4-apache
COPY 000-default.conf /etc/apache2/sites-available/000-default.conf
COPY start-apache /usr/local/bin
RUN chmod 755 /usr/local/bin/start-apache
RUN a2enmod rewrite
# Copy application source
RUN mkdir /var/www/public
COPY src /var/www/public
RUN chown -R www-data:www-data /var/www
CMD ["start-apache"]

View File

@@ -1,49 +0,0 @@
---
- name: show remote host
debug:
msg: "the remote server is {{ ansible_host }}"
- name: create build dir if not exists
file:
path: "{{ build_root_abspath }}"
state: directory
- name: git clone
git:
repo: "https://pvggitea.duckdns.org/GiteaTeam/demolamp.git"
dest: "{{ build_root_abspath }}"
remote: "origin"
version: "main"
- name: Stop a container
community.docker.docker_container:
name: demolamp
state: stopped
- name: Remove container
community.docker.docker_container:
name: demolamp
state: absent
- name: Remove the docker image for demolamp if exists
community.docker.docker_image:
name: "demolamp"
tag: "{{ demobackend_version }}"
state: absent
- name: Build demolamp image
community.docker.docker_image:
name: demolamp
source: build
build:
path: "{{ build_root_abspath }}"
pull: false
tag: "{{ demobackend_version }}"
- name: run docker
community.docker.docker_container:
name: demolamp
state: started
recreate: yes
image: "demolamp:{{ demobackend_version }}"
ports:
- "80:80"

View File

@@ -6,15 +6,15 @@ sentinelMasterName: "mymaster_hkdev"
redisha_memLimit: "2GB"
redisha_nodes:
- hostname: "hkof1devrds01.ecvision.com"
ipaddr: "10.75.42.25"
- hostname: "pvgdemo1.pvg.internal"
ipaddr: "192.168.11.121"
isMaster: true
isReplica: false
- hostname: "hkof1devrds02.ecvision.com"
ipaddr: "10.75.42.26"
- hostname: "pvgdemo2.pvg.internal"
ipaddr: "192.168.11.122"
isMaster: false
isReplica: true
- hostname: "hkof1devrds03.ecvision.com"
ipaddr: "10.75.42.27"
- hostname: "pvgdemo3.pvg.internal"
ipaddr: "192.168.11.123"
isMaster: false
isReplica: true

View File

@@ -1,4 +0,0 @@
#!/usr/bin/env bash
sed -i "s/Listen 80/Listen ${PORT:-80}/g" /etc/apache2/ports.conf
sed -i "s/:80/:${PORT:-80}/g" /etc/apache2/sites-enabled/*
apache2-foreground