Skip to content

Commit 2cb37e8

Browse files
Initial commit
1 parent 4176848 commit 2cb37e8

102 files changed

Lines changed: 11932 additions & 17 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
src/frontend/node_modules/
2+
src/frontend/dist/
3+
src/backend/.env
4+
src/backend/vendor/
5+
src/backend/public/dist/
6+
src/backend/data

README.md

Lines changed: 288 additions & 17 deletions
Large diffs are not rendered by default.

src/backend/.env.example

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
SEQURA_ACCOUNT_KEY=your_account
2+
SEQURA_ACCOUNT_SECRET=your_secret
3+
SEQURA_ENCRYPTION_KEY=your_secret_passphrase
4+
SEQURA_WEBHOOK_BASE_URL=https://your-ngrok-url.ngrok.app
5+
APP_ENV=development

src/backend/Dockerfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
FROM php:8.4-apache
2+
3+
RUN a2enmod rewrite headers
4+
RUN apt-get update && apt-get install -y unzip git \
5+
&& pecl install xdebug \
6+
&& docker-php-ext-enable xdebug \
7+
&& rm -rf /var/lib/apt/lists/*
8+
9+
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
10+
COPY --from=node:22-slim /usr/local/bin/node /usr/local/bin/node
11+
COPY --from=node:22-slim /usr/local/lib/node_modules /usr/local/lib/node_modules
12+
RUN ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm
13+
14+
COPY apache.conf /etc/apache2/sites-available/000-default.conf
15+
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
16+
RUN chmod +x /usr/local/bin/entrypoint.sh
17+
18+
WORKDIR /var/www/html
19+
EXPOSE 80
20+
21+
ENTRYPOINT ["entrypoint.sh"]

src/backend/apache.conf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<VirtualHost *:80>
2+
DocumentRoot /var/www/html/backend/public
3+
<Directory /var/www/html/backend/public>
4+
AllowOverride All
5+
Require all granted
6+
</Directory>
7+
</VirtualHost>

src/backend/bin/init-data.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
require_once __DIR__ . '/../vendor/autoload.php';
6+
7+
use SeQura\Demo\Bootstrap;
8+
use SeQura\Demo\Config;
9+
use SeQura\Demo\Console\InitDataCommand;
10+
11+
Config::load(__DIR__ . '/../.env');
12+
13+
Bootstrap::init();
14+
15+
$command = new InitDataCommand();
16+
$command->execute();

src/backend/composer.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "sequra/demo-backend",
3+
"type": "project",
4+
"minimum-stability": "dev",
5+
"prefer-stable": true,
6+
"require": {
7+
"php": ">=8.4",
8+
"sequra/integration-core": "^4.1.0",
9+
"ext-json": "*"
10+
},
11+
"repositories": [
12+
{
13+
"type": "git",
14+
"url": "https://github.com/sequra/integration-core.git"
15+
}
16+
],
17+
"autoload": {
18+
"psr-4": {
19+
"SeQura\\Demo\\": "src/"
20+
}
21+
},
22+
"require-dev": {
23+
"squizlabs/php_codesniffer": "^4.0"
24+
}
25+
}

src/backend/composer.lock

Lines changed: 140 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/backend/data/.gitkeep

Whitespace-only changes.

src/backend/docker-compose.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
services:
2+
sequra_demo_shop:
3+
build: .
4+
ports:
5+
- "8081:80"
6+
volumes:
7+
- ./:/var/www/html/backend
8+
- ../frontend:/var/www/html/frontend
9+
- ./xdebug.ini:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
10+
working_dir: /var/www/html/backend

0 commit comments

Comments
 (0)