File tree Expand file tree Collapse file tree 11 files changed +76
-87
lines changed
Expand file tree Collapse file tree 11 files changed +76
-87
lines changed Original file line number Diff line number Diff line change 3131 - name : Run Build
3232 run : pnpm build
3333
34-
35- build-docker-on-pr :
36- if : github.event_name == 'pull_request'
37- needs : build-app
38- runs-on : ubuntu-latest
39- steps :
40- - name : Check out the code
41- uses : actions/checkout@v3
42-
43- - name : Set up Docker Buildx
44- uses : docker/setup-buildx-action@v3
45-
46- - name : Prepare .env file
47- run : |
48- cp .env.production.example .env.production
49-
50- - name : Run custom Docker build script
51- run : |
52- chmod +x ./docker/build.sh
53- echo "Building Docker image for ${{ github.base_ref }}"
54- ./docker/build.sh ${{ github.base_ref == 'canary' && 'canary' || '' }}
55-
5634 build-and-push-docker-on-push :
5735 if : github.event_name == 'push'
5836 runs-on : ubuntu-latest
7553
7654 - name : Build and push Docker image using custom script
7755 run : |
78- chmod +x ./docker/build.sh
7956 chmod +x ./docker/push.sh
80- ./docker/build.sh ${{ github.ref_name == 'canary' && 'canary' || '' }}
8157 ./docker/push.sh ${{ github.ref_name == 'canary' && 'canary' || '' }}
Original file line number Diff line number Diff line change 1010 TAG=" $VERSION "
1111fi
1212
13- docker build --platform linux/amd64 --pull --rm -f ' Dockerfile ' -t " dokploy/dokploy: ${TAG} " .
13+ BUILDER= $( docker buildx create --use )
1414
15- if [ " $BUILD_TYPE " != " canary" ]; then
16- # Tag the production build as latest
17- docker tag " dokploy/dokploy:${TAG} " " dokploy/dokploy:latest"
18- fi
15+ docker buildx build --platform linux/amd64,linux/arm64 --pull --rm -t " dokploy/dokploy:${TAG} " -f ' Dockerfile' .
16+
17+ docker buildx rm $BUILDER
Original file line number Diff line number Diff line change 33# Determine the type of build based on the first script argument
44BUILD_TYPE=${1:- production}
55
6+ BUILDER=$( docker buildx create --use)
7+
68if [ " $BUILD_TYPE " == " canary" ]; then
79 TAG=" canary"
810 echo PUSHING CANARY
9- docker push " dokploy/dokploy:${TAG} "
11+ docker buildx build --platform linux/amd64,linux/arm64 --pull --rm -t " dokploy/dokploy:${TAG} " -f ' Dockerfile ' --push .
1012else
1113 echo " PUSHING PRODUCTION"
1214 VERSION=$( node -p " require('./package.json').version" )
13- docker push " dokploy/dokploy:${VERSION} "
14- docker push " dokploy/dokploy:latest"
15+ docker buildx build --platform linux/amd64,linux/arm64 --pull --rm -t " dokploy/dokploy:latest" -t " dokploy/dokploy:${VERSION} " -f ' Dockerfile' --push .
1516fi
17+
18+ docker buildx rm $BUILDER
Original file line number Diff line number Diff line change 66/** @type {import("next").NextConfig } */
77const nextConfig = {
88 reactStrictMode : true ,
9- logging :{
10- fetches :{
11- fullUrl :false
12- }
13- } ,
149
1510 /**
1611 * If you are using `appDir` then you must comment the below `i18n` config out.
Original file line number Diff line number Diff line change 11{
22 "name" : " dokploy" ,
3- "version" : " v0.0.1 " ,
3+ "version" : " v0.0.2 " ,
44 "private" : true ,
55 "license" : " AGPL-3.0-only" ,
66 "type" : " module" ,
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ export const domainRouter = createTRPCRouter({
5252 . mutation ( async ( { input } ) => {
5353 const domain = await findDomainById ( input . domainId ) ;
5454 const result = await removeDomainById ( input . domainId ) ;
55- removeDomain ( domain . application . appName , domain . uniqueConfigKey ) ;
55+ await removeDomain ( domain . application . appName , domain . uniqueConfigKey ) ;
5656
5757 return result ;
5858 } ) ,
Original file line number Diff line number Diff line change @@ -36,9 +36,8 @@ export const createApplication = async (
3636 } ) ;
3737 }
3838
39- createTraefikConfig ( newApplication . appName ) ;
40-
4139 if ( process . env . NODE_ENV === "development" ) {
40+ createTraefikConfig ( newApplication . appName ) ;
4241 await tx . insert ( domains ) . values ( {
4342 applicationId : newApplication . applicationId ,
4443 host : `${ newApplication . appName } .docker.localhost` ,
Original file line number Diff line number Diff line change @@ -48,9 +48,9 @@ void app.prepare().then(async () => {
4848 await initializeNetwork ( ) ;
4949 createDefaultTraefikConfig ( ) ;
5050 createDefaultServerTraefikConfig ( ) ;
51+ await initializePostgres ( ) ;
5152 await initializeTraefik ( ) ;
5253 await initializeRedis ( ) ;
53- await initializePostgres ( ) ;
5454 initCronJobs ( ) ;
5555 welcomeServer ( ) ;
5656
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ import { buildPaketo } from "./paketo";
1717// NIXPACKS codeDirectory = where is the path of the code directory
1818// HEROKU codeDirectory = where is the path of the code directory
1919// PAKETO codeDirectory = where is the path of the code directory
20- // DOKERFILE codeDirectory = where is the exact path of the (Dockerfile)
20+ // DOCKERFILE codeDirectory = where is the exact path of the (Dockerfile)
2121export type ApplicationNested = InferResultType <
2222 "applications" ,
2323 { mounts : true ; security : true ; redirects : true ; ports : true }
You can’t perform that action at this time.
0 commit comments