Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update docker production file #488

Merged
merged 1 commit into from
Jul 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README-PRODUCTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Following are the steps for updating the images:

* Deploy the images on EC2
* Clone this repo on the EC2 instance - a convenient way to copy of the docker-compose files
* Login to ECR using the AWS CLI by running `aws ecr get-login-password --region <aws-region> | docker login --username AWS --password-stdin <aws-account-id>.dkr.ecr.<aws-region>.amazonaws.com` replacing the region and account ID
* Login to ECR using the AWS CLI by running `sudo docker login -u AWS -p $(aws ecr get-login-password --region <region>) <accountid>.dkr.ecr.<region>.amazonaws.com` replacing the region and account ID
* Pull the online-tools image by running `docker pull <aws-account-id>.dkr.ecr.<aws-region>.amazonaws.com/spdx/online-tools:<version>` replacing the <aws-account-id>, <aws-region>, and <version>
* Launch the containers with the command `docker-compose -f docker-compose.prod.yml up -d`
* If needed upgrade the database:
Expand All @@ -36,8 +36,8 @@ Following are the steps for updating the images:
Following are the steps for a clean initial installaction of the application:

* Launch an AWS EC2 instance
* Reccomend Ubuntu Server 18.04 LTS (HVM)
* Reccomend T2 medium
* Reccomend Ubuntu Server 22.04.2 LTS (HVM)
* Reccomend T3 large
* Login to the instance and install Docker, Docker-Compose, and AWS CLI
* See Docker [Installation for Ubuntu](https://docs.docker.com/engine/install/ubuntu/)
* Dowload docker-compose: `sudo curl -L "https://github.com/docker/compose/releases/download/1.26.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose`
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ services:
build:
context: ./
dockerfile: dockerfile.prod
image: 410487266669.dkr.ecr.us-west-2.amazonaws.com/spdx/online-tools:1.2.0
image: 410487266669.dkr.ecr.us-west-2.amazonaws.com/spdx/online-tools:1.2.1
expose:
- 8000
volumes:
Expand Down
20 changes: 0 additions & 20 deletions dockerfile.prod
Original file line number Diff line number Diff line change
Expand Up @@ -59,23 +59,3 @@ RUN mv ./supervisor_api.conf /etc/supervisor/conf.d

# Start the supervisor
CMD /usr/bin/supervisord -n -c /etc/supervisor/supervisord.conf

# Install necessary packages
RUN apt-get update && \
apt-get install -y cron && \
rm -rf /var/lib/apt/lists/*

# Set the working directory
WORKDIR /spdx

# Add the crontab file
ADD crontab /etc/cron.d/cleanup-cron

# Give execution rights on the cron job
RUN chmod 0644 /etc/cron.d/cleanup-cron

# Apply cron job
RUN crontab /etc/cron.d/cleanup-cron

# Run the command on container startup
CMD ["cron", "-f"]
2 changes: 1 addition & 1 deletion src/src/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def get_tools_version(jar_name):
return 'Unknown'


spdx_online_tools_version = '1.2.0'
spdx_online_tools_version = '1.2.1'

"""
Visit https://github.com/spdx/tools-java/releases to know about the tools releases.
Expand Down