doctl apps create --spec .do/app.yaml
digitalocean / sample-monorepo Goto Github PK
View Code? Open in Web Editor NEWSample mono repo app (with multiple components) on the DigitalOcean App Platform.
Sample mono repo app (with multiple components) on the DigitalOcean App Platform.
doctl apps create --spec .do/app.yaml
Hi, I wasn't sure where to create an issue/reach out. So I thought this might be a good place to reach out. I've created a YAML spec for my DO App Platform based on the sample on this repository.
Which looks like this:
name: unique-expressions
services:
- name: api
environment_slug: node-js
github:
repo: Valencian-Digital/unique-expressions
branch: main
deploy_on_push: true
source_dir: api
routes:
- path: /api
But when I try to execute
doctl apps create --spec .do/app.yaml
It returns a 500 Error and nothing else. I've tried executing the command both in a Github action and locally with different API tokens. I'm able to access other resources on my DO account but I can't successfully create the spec.
Do you know what could be going wrong?
Is there a way to only deploy a particular component if there are changes within a certain path? Example structure:
- web
- common
- api
- marketing
If I push a change to marketing
, then marketing
would only deploy.
If I push a change inside api
, then api
would only deploy.
If I push a change inside common
, then web
and api
would deploy.
Similar to GitHub actions and the paths
property
Here: https://github.com/digitalocean/sample-monorepo/blob/main/.do/app.yaml#L16
And Here: https://github.com/digitalocean/sample-monorepo/blob/main/landing/Dockerfile
The dockerfile adds the static assets to /app, and seemingly the contents of /app get copied out and added to the group of static assets. But if I add anything to my Dockerfile, for example
FROM alpine
ADD . /app/
WORKDIR /app
RUN echo "howdy" >> index.html
The contents of the file don't change. If I do the docker image build on my machine, I see the intended output
$ docker build -t some .
Sending build context to Docker daemon 3.072kB
Step 1/4 : FROM alpine
---> b2aa39c304c2
Step 2/4 : ADD . /app/
---> b973e426495f
Step 3/4 : WORKDIR /app
---> Running in d9c5403f821d
Removing intermediate container d9c5403f821d
---> 566ea7d8d0e4
Step 4/4 : RUN echo howdy >> index.html
---> Running in bf1f6ceb0464
Removing intermediate container bf1f6ceb0464
---> 09d3bb4b5cfb
Successfully built 09d3bb4b5cfb
Successfully tagged some:latest
$ docker run -it --rm some cat /app/index.html
Welcome!
howdy
But at my static site, after a build
Welcome!
So what gives? This pattern of adding stuff into a Docker container, theoretically manipulating it, and then it gets copied out of the image afterward is pretty unique/odd, even if it did work, but it seems like it doesn't.
I have tried to make a monorepo with Nuxt (frontend) and Laravel (backend) and use doctl
to create an app.
So i copied the sample-laravel to the backend folder and run it with all the yaml settings from the functioning sample laravel demo.
But i get bash: heroku-php-apache2: command not found
on every try.
I tried to add a Procfile
with web: vendor/bin/heroku-php-apache2 public/
, still the same.
I think maybe it is because of the source_dir
in the yaml, but dont know how to fix it.
Is it something i'm missing here or is it expected? Or can i use something else to run the php service?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.