Store all your CCD frames in FITS format in one place and easily search them by ID, object name, Julian date, location, observer, or by used filter.
The following environment variables need to be defined in .env
file. See .env.example
for inspiration.
ACCESS_KEY_S3
= Amazon S3 access key
SECRET_KEY_S3
= Amazon S3 secret key
REGION
= Amazon S3 region
ENDPOINT_S3
= Amazon S3 endpoint
ZIP_BUCKET
= Name of existing bucket in storage, where generated ZIP files will be stored
POSTGRES_HOST
= Database host
POSTGRES_PORT
= Database port
POSTGRES_PASSWORD
= Database password
POSTGRES_USER
= Database user
POSTGRES_DB
= Database name
JWT_SECRET
= JWT secret
MAIL_HOST
= SMTP host
MAIL_PORT
= SMTP port
MAIl_USERNAME
= Email username
MAIL_PASSWORD
= Email password
GUI_URL
= GUI URL
Clone the project
git clone [email protected]:sarkapalkovicova/ccd-archive.git
Go to the project directory
cd ccd-archive
Compile and package code in JAR format (Java version 21 is required)
mvn clean package -DskipTests
Run command
docker compose up
The application server should be running at http://localhost:8080
.
The OpenAPI documentation is accessible at http://localhost:8080/swagger-ui/index.html
.
For proper functioning, it is necessary to seed FITS header keywords in the database. You can use the Adminer app, which runs at http://localhost:8001
and provides GUI for more accessible work with the database.
INSERT INTO fits_header_key_words (name) VALUES ('OBJECT_NAME');
INSERT INTO fits_header_key_words (name) VALUES ('JULIAN_DATE');
INSERT INTO fits_header_key_words (name) VALUES ('OBSERVER');
INSERT INTO fits_header_key_words (name) VALUES ('LOCATION');
INSERT INTO fits_header_key_words (name) VALUES ('FILTER');
INSERT INTO fits_header_key_words (name) VALUES ('EXPOSURE_TIME');
INSERT INTO fits_header_key_words (name) VALUES ('TEMPERATURE');
To upload frames it is needed to create at least one FITS header profile.
INSERT INTO fits_header_profiles (name) VALUES ('KHO');
INSERT INTO fits_header_key_sets (fits_header_profile_id, date) VALUES (1, '2024-06-23 12:45:30');
INSERT INTO key_word_value (value, fits_header_key_set_id, fits_header_key_word_id) VALUES ('OBJECT', 1, 1);
INSERT INTO key_word_value (value, fits_header_key_set_id, fits_header_key_word_id) VALUES ('JD', 1, 2);
INSERT INTO key_word_value (value, fits_header_key_set_id, fits_header_key_word_id) VALUES ('OBSERVER', 1, 3);
INSERT INTO key_word_value (value, fits_header_key_set_id, fits_header_key_word_id) VALUES ('LOCATION', 1, 4);
INSERT INTO key_word_value (value, fits_header_key_set_id, fits_header_key_word_id) VALUES ('FILTER', 1, 5);
INSERT INTO key_word_value (value, fits_header_key_set_id, fits_header_key_word_id) VALUES ('EXPTIME', 1, 6);
INSERT INTO key_word_value (value, fits_header_key_set_id, fits_header_key_word_id) VALUES ('CCD-TEMP', 1, 7);
If you do not have an AWS account, you can store frames in local MinIO storage.
To use MinIO, setting the environment variable ENDPOINT_S3
to value http://minio:9000
(minio
should be name of docker container) is necessary. Variables ACCESS_KEY_S3
and SECRET_KEY_S3
can be set to custom values which will be created additionally.
MinIO console runs at http://localhost:9001
.
-
Username =
admin
-
Password =
password
After logging in, go to the Access keys section via the sidebar panel and click the Create access key button. Inset your custom access key and secret key and click Create.
Do not forget to create a bucket with the name set in ZIP_BUCKET
(Buckets → Create Bucket).