-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Dockerize frontend, too * Update the Makefile according to the new docker compose stuff * Update check.yaml * Attempt to fix the check * Use the example .env file for tests
- Loading branch information
Showing
25 changed files
with
229 additions
and
213 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# CLICKHOUSE | ||
CLICKHOUSE_DATABASE=poeticmetric | ||
CLICKHOUSE_HOST=clickhouse | ||
CLICKHOUSE_PASSWORD=poeticmetric | ||
CLICKHOUSE_TCP_PORT=9000 | ||
CLICKHOUSE_USER=poeticmetric | ||
|
||
# DOCKER COMPOSE | ||
COMPOSE_PROJECT_NAME=poeticmetric-development | ||
|
||
# POETICMETRIC | ||
DEBUG=true | ||
FRONTEND_BASE_URL=https://dev.poeticmetric.com | ||
HOSTED=true | ||
NODE_RED_BASE_URL=https://node-red.webgazer.io/poeticmetric | ||
REMOTE_DEBUG=false | ||
REST_API_BASE_URL=https://api.dev.poeticmetric.com | ||
WORKER_COUNT=1 | ||
|
||
# POSTGRES | ||
POSTGRES_DATABASE=poeticmetric | ||
POSTGRES_HOST=postgres | ||
POSTGRES_PASSWORD=poeticmetric | ||
POSTGRES_PORT=5432 | ||
POSTGRES_USER=poeticmetric | ||
|
||
# RABBITMQ | ||
RABBITMQ_HOST=rabbitmq | ||
RABBITMQ_PASSWORD=poeticmetric | ||
RABBITMQ_PORT=5672 | ||
RABBITMQ_USER=poeticmetric | ||
RABBITMQ_VHOST=poeticmetric | ||
|
||
# REDIS | ||
REDIS_HOST=redis | ||
REDIS_PASSWORD=redis | ||
REDIS_PORT=6379 | ||
|
||
# SENTRY | ||
SENTRY_DSN=https://[email protected]/4504514544599040 | ||
SENTRY_ENVIRONMENT=development | ||
|
||
# SMTP | ||
SMTP_HOST=email-smtp.eu-west-1.amazonaws.com | ||
SMTP_PASSWORD=BJ+6e13cdMjI6PiGm5dGUeXo7x9tBNBHHYSjzAydACZt | ||
SMTP_PORT=587 | ||
SMTP_USER=AKIAQFCOKB32IXJ7WDXE | ||
|
||
# STRIPE | ||
STRIPE_PUBLISHABLE_KEY=pk_test_51JsF5eLcgjrGpczs2hzDsONDQlYIsR1iu57vmAec2N4OMjh7w4achSkIb4aCCGea6YgyMKu0XNazacVTIHXzcolX00XcDdVw8l | ||
STRIPE_SECRET_KEY=sk_test_51JsF5eLcgjrGpczseNOFKSWGSMOHkRQIt3CK9okvUytWVXtOrjaKnbkZFeTAsonb9GOsMShsIVkFJoxT9kddBMOC00TRwC5Fcs | ||
STRIPE_WEBHOOK_SIGNING_SECRET=whsec_d612fdd17aadb4f10a2ece1f20bdbac3ee56262c9cb732bf59c96c9efb393c08 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
.DS_Store | ||
/etc/ssl | ||
/.env |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
test: | ||
@export COMPOSE_PROJECT_NAME=poeticmetric-test | ||
|
||
@# prepare Postgres database | ||
@printf "Waiting for Postgres...\n" | ||
@docker compose run --rm --entrypoint 'bash -c "wait-for-it -s -q "$${POSTGRES_HOST}":"$${POSTGRES_PORT}" -- echo \"Postgres is ready!\""' rest-api 2> /dev/null | ||
@docker compose exec -- postgres bash -c 'export PGPASSWORD=$${POSTGRES_PASSWORD} && dropdb --if-exists --username=$${POSTGRES_USER} $${POSTGRES_DB}' | ||
@docker compose exec -- postgres bash -c 'export PGPASSWORD=$${POSTGRES_PASSWORD} && createdb --username=$${POSTGRES_USER} $${POSTGRES_DB}' | ||
@docker compose run --rm rest-api migrate-postgres up 2> /dev/null | ||
|
||
@# prepare ClickHouse database | ||
@printf "Waiting for ClickHouse...\n" | ||
@docker compose run --rm --entrypoint 'bash -c "wait-for-it -s -q "$${CLICKHOUSE_HOST}":"$${CLICKHOUSE_TCP_PORT}" -- echo \"ClickHouse is ready!\""' rest-api 2> /dev/null | ||
@docker compose exec -- clickhouse bash -c 'clickhouse-client --query "drop database if exists $${CLICKHOUSE_DB};"' | ||
@docker compose exec -- clickhouse bash -c 'clickhouse-client --query "create database $${CLICKHOUSE_DB};"' | ||
@docker compose run --rm rest-api migrate-clickhouse up 2> /dev/null | ||
|
||
@# run tests | ||
@docker compose run --rm rest-api run-tests ./... 2> /dev/null | ||
|
||
@# drop Postgres database | ||
@docker compose exec -- postgres bash -c 'export PGPASSWORD=$${POSTGRES_PASSWORD} && dropdb --if-exists --username=$${POSTGRES_USER} $${POSTGRES_DB}' | ||
|
||
@# drop ClickHouse database | ||
@docker compose exec -- clickhouse bash -c 'clickhouse-client --query "drop database if exists $${CLICKHOUSE_DB};"' | ||
|
||
@docker compose down -v 2> /dev/null | ||
|
||
test-build: | ||
@docker compose build rest-api 2> /dev/null |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.