diff --git a/.github/workflows/loco-gen-deploy.yml b/.github/workflows/loco-gen-deploy.yml new file mode 100644 index 000000000..f2ebdd754 --- /dev/null +++ b/.github/workflows/loco-gen-deploy.yml @@ -0,0 +1,43 @@ +name: "[loco-gen-deploy]" + +on: + push: + branches: + - master + pull_request: + +env: + RUST_TOOLCHAIN: stable + TOOLCHAIN_PROFILE: minimal + +jobs: + g-deploy-docker: + runs-on: ubuntu-latest + + permissions: + contents: read + + steps: + - name: Checkout the code + uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + with: + toolchain: ${{ env.RUST_TOOLCHAIN }} + - name: Setup Rust cache + uses: Swatinem/rust-cache@v2 + + - name: Install seaorm cli + run: cargo install sea-orm-cli + + - name: install 'loco new' + run: | + cargo install --path ./loco-new + + - name: create myapp + run: | + loco new -n myapp --db sqlite --bg async --assets serverside -a + + - name: + run: cargo loco generate deployment --kind docker && docker build -t demo . + working-directory: ./myapp + diff --git a/loco-gen/src/templates/deployment/docker/docker.t b/loco-gen/src/templates/deployment/docker/docker.t index 9d8563595..99b7ca8e8 100644 --- a/loco-gen/src/templates/deployment/docker/docker.t +++ b/loco-gen/src/templates/deployment/docker/docker.t @@ -23,4 +23,4 @@ COPY --from=builder /usr/src/{{fallback_file}} /usr/app/{{fallback_file}} COPY --from=builder /usr/src/config /usr/app/config COPY --from=builder /usr/src/target/release/{{pkg_name}}-cli /usr/app/{{pkg_name}}-cli -ENTRYPOINT ["/usr/app/{{pkg_name}}-cli"] \ No newline at end of file +ENTRYPOINT ["/usr/app/{{pkg_name}}-cli"]