Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ansible.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: "3.10"

- name: Install dependencies in virtual environment
run: |
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
id: set_domain
run: |
DOMAIN=$(jq -r --arg type "${{ github.event.inputs.deploy_type }}" --arg site "${{ github.event.inputs.deploy_site }}" '.[$type][$site].domain' .github/workflows/config/domain.json)

if [ "$DOMAIN" = "null" ]; then
echo "Error: Unknown deploy_type: ${{ github.event.inputs.deploy_type }} or deploy_site: ${{ github.event.inputs.deploy_site }}"
exit 1
Expand All @@ -117,15 +117,15 @@ jobs:

- name: Run Ansible Playbook
env:
ANSIBLE_HOST_KEY_CHECKING: 'False'
ANSIBLE_HOST_KEY_CHECKING: "False"
run: |
source venv/bin/activate

DOMAIN="${{ steps.set_domain.outputs.deploy_domain }}"
echo "Using domain: $DOMAIN"

# Set deploy tag based on deploy_site
DEPLOY_TAG="latest"
DEPLOY_TAG="prod"
if [ "${{ github.event.inputs.deploy_site }}" = "dev" ]; then
DEPLOY_TAG="dev"
fi
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/config/domain.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"domain": "api-a11yvillage.coseeing.org"
},
"dev": {
"domain": "api-a11yvillage.dev.coseeing.org"
"domain": "api-a11yvillage-dev.coseeing.org"
}
},
"a11yvillage-web": {
Expand All @@ -31,4 +31,4 @@
"domain": "api.dev.coseeing.org"
}
}
}
}
9 changes: 9 additions & 0 deletions ansible_yaml/a11yvillage-server-playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@
MARIADB_PORT={{ MARIADB_PORT }}
MARIADB_DATABASE={{ MARIADB_DATABASE }}
ALLOWED_HOSTS=*
{% if project_postfix == "-dev" %}
UI_HOST=https://a11yvillage-dev.coseeing.org
API_HOST=https://api-a11yvillage-dev.coseeing.org
STORAGE_HOST=https://storage.a11yvillage.dev.coseeing.org
{% else %}
UI_HOST=https://a11yvillage.coseeing.org
API_HOST=https://api-a11yvillage.coseeing.org
STORAGE_HOST=https://storage.a11yvillage.coseeing.org
{% endif %}

- name: Copy docker-compose.yml Document
copy:
Expand Down
10 changes: 6 additions & 4 deletions ansible_yaml/a11yvillage-web-playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,19 @@
dest: "{{ docker_compose_dir }}/.env"
content: |
{% if project_postfix == "-dev" %}
NEXT_PUBLIC_BASE_URL=https://api-a11yvillage.dev.coseeing.org/blog/api
NEXT_PUBLIC_BASE_URL=https://a11yvillage-dev.coseeing.org
NEXT_PUBLIC_BASE_API_URL=https://api-a11yvillage-dev.coseeing.org
NEXT_PUBLIC_BASE_STORAGE_URL=https://storage.a11yvillage.dev.coseeing.org
{% else %}
NEXT_PUBLIC_API_URL=https://api-a11yvillage.coseeing.org/
NEXT_PUBLIC_BASE_URL=https://a11yvillage.coseeing.org
NEXT_PUBLIC_BASE_API_URL=https://api-a11yvillage.coseeing.org
NEXT_PUBLIC_BASE_STORAGE_URL=https://storage.a11yvillage.coseeing.org
{% endif %}
NEXT_PUBLIC_RESOURCE_URL=https://a11yvillage.s3.ap-northeast-1.amazonaws.com/

- name: Copy docker-compose.yml Document
copy:
dest: "{{ docker_compose_dir }}/docker-compose.yml"
content: |
version: "3.7"
services:
a11yvillage-web:
container_name: "a11yvillage-web{{ project_postfix }}"
Expand Down
5 changes: 2 additions & 3 deletions ansible_yaml/coseeing-web-playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,16 @@
dest: "{{ docker_compose_dir }}/.env"
content: |
{% if project_postfix == "-dev" %}
NEXT_PUBLIC_BASE_URL=https://api.dev.coseeing.org/about/api
NEXT_PUBLIC_BASE_API_URL=https://api-dev.coseeing.org
{% else %}
NEXT_PUBLIC_BASE_URL=https://api.coseeing.org/about/api
NEXT_PUBLIC_BASE_API_URL=https://api.coseeing.org
{% endif %}
NEXT_PUBLIC_GOOGLE_TAG_MANAGER_ID=GTM-NQQ79V67

- name: Copy docker-compose.yml Document
copy:
dest: "{{ docker_compose_dir }}/docker-compose.yml"
content: |
version: "3.7"
services:
coseeing-web:
container_name: "coseeing-web{{ project_postfix }}"
Expand Down
Loading