Deploy shopify custom app in AWS EC2 instance

sahanNeos
Shopify Partner
6 0 0

Hi I need to deploy my shopify custom app with a theme app extension inside using AWS EC2 instance. What I have done so far is working fine but the changes I push to git after the initial deploy in the theme app extension is not applied in my store. All the other changes in the custom app is applied. I don't know if the procedure I have done is correct or not. What I have done is,

 

  • Created a domain for my app.
  • Created a app in my partners dashboard and added the client key and secret generated for the app to my custom app from code level.
  • Deploy the shopify custom app from my local env to the store(shopify app deploy) and install it in admin dashboard.(don't know if this is correct or not when deploy in production).
  • Push the code to git.
  • Clone the repo in aws instance.
  • Setup nginx conf with reverse proxy to port 3000(which my app runs).
  • Run the app in pm2.
  • Add my domain to URL in app configuration from partners dashboard.

 

After the above procedure my app can be embedded to the theme and the changes are working fine in the frontend and admin dashboard.

But when I do some changes to my theme app extension files (app/extensions/theme-app-ext) and push to git,pull the changes,npm run build and re-run the app the changes are not applied to the frontend.

 

If there is another way to do this process please provide the answer

Reply 1 (1)

rlesher
Shopify Partner
1 0 0

Shopify theme app extensions are hosted by Shopify itself, not by your server (unlike the rest of your app). This means you deploy them using "shopify app deploy" instead of deploying to your app server. You can learn more here: https://shopify.dev/docs/apps/online-store/theme-app-extensions/getting-started

Rob Lesher
Shopify Partner