Skip to content

Commit

Permalink
Merge pull request coollabsio#1001 from coollabsio/next
Browse files Browse the repository at this point in the history
v3.12.29
  • Loading branch information
andrasbacsai authored Mar 20, 2023
2 parents cbd634f + 2bad984 commit 41c84e3
Show file tree
Hide file tree
Showing 20 changed files with 138 additions and 123 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/production-release-dockerhub.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Production Release to DockerHub

on:
release:
types: [released]
push:
branches:
- "this-branch-does-not-exists"

jobs:
arm64:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/staging-release-dockerhub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Staging Release to DockerHub
on:
push:
branches:
- "next"
- "this-branch-does-not-exists"

jobs:
arm64:
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/staging-release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Staging Release to ghcr.io

concurrency:
group: staging_environment
cancel-in-progress: true
on:
push:
branches-ignore:
Expand All @@ -11,14 +13,12 @@ env:

jobs:
amd64:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: "next"
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to ghcr.io
Expand All @@ -41,14 +41,13 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
aarch64:
runs-on: [self-hosted, arm64]
runs-on:
group: aarch-runners
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: "next"
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to ghcr.io
Expand Down
1 change: 1 addition & 0 deletions apps/api/devTemplates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@
proxy:
- port: "22"
hostPort: $$config_hostport_ssh
- port: "3000"
variables:
- id: $$config_hostport_ssh
name: SSH_PORT
Expand Down
1 change: 1 addition & 0 deletions apps/api/src/lib/buildPacks/gatsby.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const createDockerfile = async (data, imageforBuild): Promise<void> => {
Dockerfile.push('WORKDIR /app');
Dockerfile.push(`LABEL coolify.buildId=${buildId}`);
Dockerfile.push(`COPY --from=${applicationId}:${tag}-cache /app${publishDirectory} ./`);
Dockerfile.push('RUN rm -fr .git');
if (baseImage?.includes('nginx')) {
Dockerfile.push(`COPY /nginx.conf /etc/nginx/nginx.conf`);
}
Expand Down
1 change: 1 addition & 0 deletions apps/api/src/lib/buildPacks/laravel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const createDockerfile = async (data, image): Promise<void> => {
`COPY --chown=application:application --from=${applicationId}:${tag}-cache /app/mix-manifest.json /app/public/mix-manifest.json`
);
Dockerfile.push(`COPY --chown=application:application . ./`);
Dockerfile.push('RUN rm -fr .git');
Dockerfile.push(`EXPOSE ${port}`);
await fs.writeFile(`${workdir}/Dockerfile`, Dockerfile.join('\n'));
};
Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/lib/buildPacks/nestjs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const createDockerfile = async (data, image): Promise<void> => {
Dockerfile.push('RUN curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm@7');
}
Dockerfile.push(`COPY --from=${applicationId}:${tag}-cache /app${publishDirectory} ./`);

Dockerfile.push('RUN rm -fr .git');
Dockerfile.push(`EXPOSE ${port}`);
Dockerfile.push(`CMD ${startCommand}`);
await fs.writeFile(`${workdir}/Dockerfile`, Dockerfile.join('\n'));
Expand Down
1 change: 1 addition & 0 deletions apps/api/src/lib/buildPacks/nextjs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const createDockerfile = async (data, image): Promise<void> => {
Dockerfile.push(`COPY /nginx.conf /etc/nginx/nginx.conf`);
}
Dockerfile.push(`COPY --from=${applicationId}:${tag}-cache /app${publishDirectory} ./`);
Dockerfile.push('RUN rm -fr .git');
Dockerfile.push(`EXPOSE 80`);
}

Expand Down
1 change: 1 addition & 0 deletions apps/api/src/lib/buildPacks/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const createDockerfile = async (data, image): Promise<void> => {
Dockerfile.push('RUN curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm@7');
}
Dockerfile.push(`COPY .${baseDirectory || ''} ./`);
Dockerfile.push('RUN rm -fr .git');
Dockerfile.push(`RUN ${installCommand}`);
if (buildCommand) {
Dockerfile.push(`RUN ${buildCommand}`);
Expand Down
1 change: 1 addition & 0 deletions apps/api/src/lib/buildPacks/nuxtjs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const createDockerfile = async (data, image): Promise<void> => {
Dockerfile.push(`COPY /nginx.conf /etc/nginx/nginx.conf`);
}
Dockerfile.push(`COPY --from=${applicationId}:${tag}-cache /app${publishDirectory} ./`);
Dockerfile.push('RUN rm -fr .git');
Dockerfile.push(`EXPOSE 80`);
}

Expand Down
1 change: 1 addition & 0 deletions apps/api/src/lib/buildPacks/react.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const createDockerfile = async (data, image): Promise<void> => {
Dockerfile.push(`LABEL coolify.buildId=${buildId}`);
Dockerfile.push('WORKDIR /app');
Dockerfile.push(`COPY --from=${applicationId}:${tag}-cache /app${publishDirectory} ./`);
Dockerfile.push('RUN rm -fr .git');
if (baseImage?.includes('nginx')) {
Dockerfile.push(`COPY /nginx.conf /etc/nginx/nginx.conf`);
}
Expand Down
1 change: 1 addition & 0 deletions apps/api/src/lib/buildPacks/rust.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const createDockerfile = async (data, image, name): Promise<void> => {
);
Dockerfile.push(`RUN update-ca-certificates`);
Dockerfile.push(`COPY --from=${applicationId}:${tag}-cache /app/target/release/${name} ${name}`);
Dockerfile.push('RUN rm -fr .git');
Dockerfile.push(`EXPOSE ${port}`);
Dockerfile.push(`CMD ["/app/${name}"]`);
await fs.writeFile(`${workdir}/Dockerfile`, Dockerfile.join('\n'));
Expand Down
1 change: 1 addition & 0 deletions apps/api/src/lib/buildPacks/static.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const createDockerfile = async (data, image): Promise<void> => {
}
if (buildCommand) {
Dockerfile.push(`COPY --from=${applicationId}:${tag}-cache /app${publishDirectory} ./`);
Dockerfile.push('RUN rm -fr .git');
} else {
Dockerfile.push(`COPY .${baseDirectory || ''} ./`);
}
Expand Down
1 change: 1 addition & 0 deletions apps/api/src/lib/buildPacks/svelte.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const createDockerfile = async (data, image): Promise<void> => {
Dockerfile.push('WORKDIR /app');
Dockerfile.push(`LABEL coolify.buildId=${buildId}`);
Dockerfile.push(`COPY --from=${applicationId}:${tag}-cache /app${publishDirectory} ./`);
Dockerfile.push('RUN rm -fr .git');
if (baseImage?.includes('nginx')) {
Dockerfile.push(`COPY /nginx.conf /etc/nginx/nginx.conf`);
}
Expand Down
1 change: 1 addition & 0 deletions apps/api/src/lib/buildPacks/vuejs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const createDockerfile = async (data, image): Promise<void> => {
Dockerfile.push('WORKDIR /app');
Dockerfile.push(`LABEL coolify.buildId=${buildId}`);
Dockerfile.push(`COPY --from=${applicationId}:${tag}-cache /app${publishDirectory} ./`);
Dockerfile.push('RUN rm -fr .git');
if (baseImage?.includes('nginx')) {
Dockerfile.push(`COPY /nginx.conf /etc/nginx/nginx.conf`);
}
Expand Down
Loading

0 comments on commit 41c84e3

Please sign in to comment.