diff --git a/infra/production/site/compose.yml b/infra/production/site/compose.yml index f52764d..d73a01a 100644 --- a/infra/production/site/compose.yml +++ b/infra/production/site/compose.yml @@ -21,8 +21,10 @@ services: image: ghcr.io/muchobien/pocketbase:latest container_name: pocketbase-learning restart: unless-stopped - command: ["serve", "--http=0.0.0.0:8090", "--dir=/pb/pb_data"] + working_dir: /pb + command: ["serve", "--http=0.0.0.0:8090", "--dir=/pb/pb_data", "--migrationsDir=/pb/pb_migrations"] volumes: - pb_data:/pb/pb_data + - ./pb_migrations:/pb/pb_migrations networks: - learning-platform diff --git a/infra/production/site/deploy-playbook.yml b/infra/production/site/deploy-playbook.yml index b98dbe6..ae85ca7 100644 --- a/infra/production/site/deploy-playbook.yml +++ b/infra/production/site/deploy-playbook.yml @@ -36,6 +36,12 @@ src: compose.yml dest: "{{ dest_dir }}/compose.yml" + - name: Copy pb_migrations to destination + ansible.builtin.copy: + src: ../../../pb_migrations + dest: "{{ dest_dir }}/" + mode: "0755" + - name: Create .env file for secrets ansible.builtin.copy: dest: "{{ dest_dir }}/.env"