From fa5dcaeb018bdf9ff20d1aa7408f8ee12bd20c63 Mon Sep 17 00:00:00 2001 From: RaymondVerhoef Date: Tue, 19 May 2026 07:54:52 +0200 Subject: [PATCH] feat: add docker-compose configuration and ansible playbook for production deployment --- infra/production/site/compose.yml | 4 +++- infra/production/site/deploy-playbook.yml | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) 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"