How to Move Apps into ACC?
Last updated
Was this helpful?
Last updated
Was this helpful?
If you've been developing a web application locally using the Django framework and are now ready to take it live, deploying it to ACC is a powerful next step. ACC provides a scalable, cloud-native environment designed for modern commerce applications, allowing you to host, build, and manage your apps with ease.
If your application is written in Python using the Django framework, your local project directory may look like this:
After setting up and running the application locally, you should see the expected output in the browser.
To run your application on ACC, you’ll need to add three essential files to your project directory:
akinon.json
– This JSON file contains the manifest-level information of your application.
Procfile
– Includes the necessary commands to run the application within ACC.
build.sh
– ACC stores image files for each new version of the application. This shell script file should contain the package contents of these image files and instructions on how they should be executed.
Sample akinon.json:
By including this file, specific requirements for ACC are defined regarding the Docker image of the application. This configuration guides versioning and the necessary commands during the build and release stages. It is important to note that the akinon.json file offers additional opportunities beyond these essentials. For more detailed information, refer to the .
Next, the contents of the build. sh file will be explored:
Finally, the Procfile must be added.
Given that the Gunicorn library is being used to handle the web part of our application, it is crucial to specify the appropriate command in the Procfile using the standard format mentioned earlier.
The provided command is responsible for running our application and setting the format for access logs. If you wish to run your own application, ensure that you input the required command in the 'web: command' format.
Three essential files have been added to the application directory. As a result, the application directory should now resemble the following:
Your app is now ready to be deployed to ACC.
To enable ACC to create a repository for the application and allow for development submissions, users must register an SSH Public Key within the ACC. If a Public Key has been previously provided, this step can be skipped.
To create an SSH Public Key, users can use the following command:
This command has created a Private and a Public Key. The Public Key will be generated under the .pub extension. Next, copy this Public Key:
If pbcopy
doesn’t work, open the file manually and copy its contents. Then paste it into ACC.
Applications within the ACC are stored in git repositories. To publish each version, users must push the corresponding tag to the git repository in ACC.
If the application is not currently versioned with git, a git repository can be created within the application directory by running the following command through the terminal:
If you're not currently versioning the application with git, create a git repository within the application by running the following command in the application directory through the terminal:
To link your git repository in the local environment to the one within ACC, first add a new remote registry to your local git repository.
remote_name: For clarity, consider using a name that includes "acc" to distinguish it from your development repo.
remote_address: Copy and paste the URL that starts with "ssh://" of your application from the application list on the “My Applications” page in ACC into this field.
Lastly, execute the following command:
To verify whether you have successfully added it, run this command:
The application can now be sent from the local environment to ACC. Create a new tag and push the first version.
After running the commands above, the v1.0.0 tag will be sent to the ACC repository.
The next step is to initiate the version build corresponding to this tag.
Go to the “My Applications” page in the ACC dashboard. Click on the name of your application. You’ll be directed to the application’s detail page, which includes a section for builds.
Follow the instructions under the “Building Application” section of the documentation to trigger the build process.
As your version is being built, you'll see one of the following statuses:
Initializing: The build has started and is being prepared.
Completed: The build finished successfully and is ready to deploy.
Failed: The build encountered an error.
If the status shows Failed, click on the build to view the error logs and troubleshoot the issue.
Once the build is marked Completed, you're ready to move on to deployment.
In ACC, applications are installed into projects, which allow you to run different versions of your app in different environments (e.g., staging, production).
If you already have a project, you can skip this step.
Go back to “My Applications” and click on your application’s name. Scroll to the Installed Projects section to see which project the app is installed in.
Navigate to the Projects page. Select your project and locate your application under the Applications section. Click on the application name to view its details. The application details page includes the URL where the app is running.
Click the URL to launch your app—now fully deployed and running in ACC!
Congratulations! Your application is now live on ACC. 🎉
If not, follow the steps outlined in the “Creating Project” section of the documentation.
As there is currently no project linked to Omnitron, the next step is to install the application into a project. To do this, follow the steps outlined in the documentation under “Adding an Application to a Project.”
Follow the steps under the “Deploying Application” section in the documentation. Once deployed successfully, the status will be updated to Deployed.
The next step is to ensure your application has access to the necessary data. To configure database connectivity, continue with the guide.