Skip to content

Commit 88c971c

Browse files
committed
Micro Framework: init docker environment
1 parent ca806c0 commit 88c971c

26 files changed

+33
-63
lines changed

.dockerignore

100644100755
File mode changed.

.editorconfig

100644100755
File mode changed.

.gitattributes

100644100755
File mode changed.

.github/FUNDING.yml

100644100755
File mode changed.

.github/workflows/ci.yml

100644100755
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66

77
jobs:
88
build:
9-
name: Build XMCY-ODC PHP Exercise
9+
name: Build Application
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout
@@ -25,6 +25,8 @@ jobs:
2525
esac
2626
done
2727
exit 1
28+
- name: Make app tests
29+
run: make test
2830
- name: Check HTTP reachability
2931
run: curl http://localhost
3032
- name: Check HTTPS reachability

.gitignore

100644100755
File mode changed.

Dockerfile

100644100755
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ FROM php:8.2-fpm-alpine AS app_php
1111
ARG STABILITY="stable"
1212
ENV STABILITY ${STABILITY}
1313

14-
# Allow to select Symfony version
15-
ARG MICRO_VERSION=""
14+
# Allow to select Micro version
15+
ARG MICRO_VERSION="^1"
1616
ENV MICRO_VERSION ${MICRO_VERSION}
1717

1818
ENV APP_ENV=prod
@@ -80,10 +80,10 @@ COPY --link . .
8080
RUN rm -Rf docker/
8181

8282
RUN set -eux; \
83-
mkdir -p var/cache var/log; \
83+
#mkdir -p var/cache var/log; \
8484
if [ -f composer.json ]; then \
8585
composer dump-autoload --classmap-authoritative --no-dev; \
86-
composer dump-env prod; \
86+
# composer dump-env prod; \
8787
composer run-script --no-dev post-install-cmd; \
8888
chmod +x bin/console; sync; \
8989
fi

LICENSE

Lines changed: 0 additions & 21 deletions
This file was deleted.

Makefile

100644100755
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ help:
1515
build: ## Pull and make docker images and compile application components
1616
@$(DOCKER_COMP) build --pull --no-cache
1717

18+
test: ## Run all tests from `phpunit.xml`
19+
@$(PHP_CONT) php vendor/bin/phpunit --verbose
20+
1821
up: ## Run made application
1922
@$(DOCKER_COMP) up --detach
2023

README.md

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# XMCY-ODC - PHP Exercise - v21.0.5
1+
# Micro Docker environment
22

3-
A [Docker](https://www.docker.com/)-based installer and runtime for the [Symfony](https://symfony.com) web framework, with full [HTTP/2](https://symfony.com/doc/current/weblink.html), HTTP/3 and HTTPS support.
3+
A [Docker](https://www.docker.com/)-based installer and runtime for the [Micro](https://micro-php.net) web framework, with full HTTP/2, HTTP/3 and HTTPS support.
44

55
## Getting Started
66

77
1. If not already done, [install Docker Compose](https://docs.docker.com/compose/install/) (v2.10+)
8-
2. Create `.env.local` and set `RAPID_HISTORY_SECRET_KEY=<apikeysecretvalue>`
8+
2. To overwrite the main configuration file (.env), simply create a new file that will depend on the APP_ENV environment variable ".env.<$APP_ENV>"
99
3. Run `make build` to build fresh images
1010
4. Run `make up` (the logs will not be displayed in the current shell. Use `make logs` if you want to see the container's log after it has started.)
1111
5. Open `https://localhost` in your favorite web browser and [accept the auto-generated TLS certificate](https://stackoverflow.com/a/15076602/1352334)
@@ -15,7 +15,7 @@ A [Docker](https://www.docker.com/)-based installer and runtime for the [Symfony
1515

1616
* Production, development and CI ready
1717
* Automatic HTTPS (in dev and in prod!)
18-
* HTTP/2, HTTP/3 and [Preload](https://symfony.com/doc/current/web_link.html) support
18+
* HTTP/2, HTTP/3 and support
1919
* Built-in [Mercure](https://symfony.com/doc/current/mercure.html) hub
2020
* Native [XDebug](docs/xdebug.md) integration
2121

@@ -27,19 +27,8 @@ A [Docker](https://www.docker.com/)-based installer and runtime for the [Symfony
2727
4. [TLS Certificates](docs/tls.md)
2828
5. [Troubleshooting](docs/troubleshooting.md)
2929

30-
## TODO's:
31-
32-
- [x] Receiver: Historical quotes
33-
- [x] Receiver: Symbols
34-
- [x] Reports: Chart
35-
- [X] Reports: Table
36-
- [x] Reports: simple abstraction layer
37-
- [X] Form: validation (email, dates, symbol)
38-
- [x] Form: autocomplete (wildcard, equals)
39-
- [x] Simple GitHub CI [Example success build](https://github.com/Asisyas/xmcy-odc/actions/runs/3642711018/jobs/6150122961)
40-
- [x] Exceptions
41-
- [x] Docker environment
42-
- [ ] Close all TODO's
43-
- [ ] Email sender
44-
- [ ] Unit tests
45-
- [ ] Frontend tests
30+
## License
31+
Micro Docker is available under the MIT License.
32+
33+
## Credits
34+
Thanks to [Kévin Dunglas](https://github.com/dunglas) for the good work that this environment is based on.

0 commit comments

Comments
 (0)