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

V exportech řazení troops a patrols dohromady #286

Merged
merged 7 commits into from
Aug 6, 2024
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
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/.idea/*
/.composer/cache/*
/attachments/*
/backups/*
Expand All @@ -18,3 +17,10 @@
!db_init.sqlite
/backup/*
/uploads/*

# editor and IDE paraphernalia
.idea
.vscode
*.swp
*.swo
*~
57 changes: 48 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,48 @@
.PHONY: local-dev-postgresql
local-dev-postgresql:
docker-compose --file deploy/dev-postgres/docker-compose.yml up --build -d
sleep 5
docker exec -it $$(docker ps | grep php-fpm | awk '{print $$1}') bash -c "./bin/installl.sh"

.PHONY: down-local-dev-postgresql
down-local-dev-postgresql:
docker-compose --file deploy/dev-postgres/docker-compose.yml down
# Check for docker/podman
DOCKER := $(shell command -v podman 2> /dev/null || command -v docker 2> /dev/null)

# Check for docker-compose/podman-compose
DOCKER_COMPOSE := $(shell command -v podman-compose 2> /dev/null || command -v docker-compose 2> /dev/null)

.PHONY: info
info:
ifeq ($(DOCKER),)
@echo "Neither docker nor podman is installed."
exit 1
else
@echo "Using $(DOCKER)"
endif

ifeq ($(DOCKER_COMPOSE),)
@echo "Neither docker-compose nor podman-compose is installed."
exit 1
else
@echo "Using $(DOCKER_COMPOSE)"
endif

# Start the containers
.PHONY: compose-up
compose-up:
$(DOCKER_COMPOSE) --file deploy/dev/docker-compose.yml up -d

# Stop the containers
.PHONY: compose-down
compose-down:
$(DOCKER_COMPOSE) --file deploy/dev/docker-compose.yml down

# Get container ID
.PHONY: $(FPM_ID)
FPM_ID = $(shell $(DOCKER) ps | grep 'quay.io/kissj/php-ubi' | awk '{print $$1}')

.PHONY: composer-install
composer-install:
$(DOCKER) exec -it -u root $(FPM_ID) sh -c "COMPOSER_ALLOW_SUPERUSER=1 composer install --no-interaction"

.PHONY: migrate
migrate:
$(DOCKER) exec -it -u root $(FPM_ID) sh -c "COMPOSER_ALLOW_SUPERUSER=1 composer phinx:migrate --no-interaction"


dev-up: info compose-up composer-install migrate
dev-down: info compose-down

7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,11 @@ kissj is scouts **registration system for national and international Scout Jambo
### Setup

1. Clone this repository: `git clone https://github.com/SkautDevs/kissj.git`
2. Setup environment (dotenv) `cp .env.example .env`
3. Run the make target, so you don't have to do install manually: `make local-dev-postgresql`
4. add line `127.0.0.1 kissj.local` to your `/etc/hosts` file
2. Copy `deploy/dev/compose.env.example` to `deploy/dev/compose.env` and fill in the values
3. Run the make target dev-up, so you don't have to do it manually: `make dev-up`
4. add line `127.0.0.1 kissj.local` to your `/etc/hosts` file(optional)
5. Open `http://kissj.local/v2/event/test-event-slug/` in your browser and you are good to go!
6. To stop the containers and remove them, run `make dev-down`(data should be preserved)

### Devstack

Expand Down
7 changes: 0 additions & 7 deletions bin/installl.sh

This file was deleted.

287 changes: 0 additions & 287 deletions ci/kissj-pipeline.yaml

This file was deleted.

Loading
Loading