Public Access
feat: add JWT_SECRET to deployment and create .env file for environment variables
This commit is contained in:
1 parent
99ac7a7fae
commit
f794dacd2d
3 files changed
+16
-1
No files matched your search
@@ -55,7 +55,8 @@ jobs:
|
||||
run: |
|
||||
ansible-playbook ansible/deploy.yml \
|
||||
-i /tmp/inventory.ini \
|
||||
-e "artifact_path=${WORKSPACE}"
|
||||
-e "artifact_path=${WORKSPACE}" \
|
||||
-e "jwt_secret=${{ secrets.JWT_SECRET }}"
|
||||
|
||||
- name: Cleanup
|
||||
if: always()
|
||||
|
||||
@@ -63,6 +63,10 @@ jobs:
|
||||
- "3001:3001"
|
||||
volumes:
|
||||
- brainwave-db:/app/backend/db
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
brainwave-db:
|
||||
@@ -77,6 +81,10 @@ jobs:
|
||||
- "3001:3001"
|
||||
volumes:
|
||||
- brainwave-db:/app/backend/db
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
brainwave-db:
|
||||
|
||||
@@ -24,6 +24,12 @@
|
||||
src: "{{ artifact_path }}/docker-compose.arm64.yml"
|
||||
dest: "{{ deploy_dir }}/docker-compose.yml"
|
||||
|
||||
- name: Create .env file
|
||||
ansible.builtin.copy:
|
||||
content: "JWT_SECRET={{ jwt_secret }}\n"
|
||||
dest: "{{ deploy_dir }}/.env"
|
||||
mode: "0600"
|
||||
|
||||
- name: Load Docker image
|
||||
ansible.builtin.command: docker load -i {{ deploy_dir }}/brainwave-arm64.tar.gz
|
||||
register: docker_load_result
|
||||
|
||||
Reference in new issue
Block a user