├── fastapi
├── app
│ ├── __init__.py
│ └── main.py
├── requirements.txt
├── compose.yaml
├── .docker
│ └── docker-compose.yaml
└── Dockerfile
├── vuejs
├── .gitignore
├── output.jpg
├── vuejs
│ ├── babel.config.js
│ ├── public
│ │ ├── favicon.ico
│ │ └── index.html
│ ├── src
│ │ ├── assets
│ │ │ └── logo.png
│ │ ├── main.js
│ │ └── App.vue
│ ├── README.md
│ ├── Dockerfile
│ └── package.json
├── .docker
│ └── docker-compose.yaml
└── compose.yaml
├── angular
├── .gitignore
├── angular
│ ├── src
│ │ ├── assets
│ │ │ └── .gitkeep
│ │ ├── app
│ │ │ ├── app.component.css
│ │ │ ├── app.component.ts
│ │ │ ├── app-routing.module.ts
│ │ │ ├── app.module.ts
│ │ │ └── app.component.spec.ts
│ │ ├── environments
│ │ │ ├── environment.prod.ts
│ │ │ └── environment.ts
│ │ ├── styles.css
│ │ ├── favicon.ico
│ │ ├── index.html
│ │ ├── main.ts
│ │ └── test.ts
│ ├── .dockerignore
│ ├── .editorconfig
│ ├── tsconfig.app.json
│ ├── tsconfig.spec.json
│ ├── .browserslistrc
│ ├── Dockerfile
│ ├── .gitignore
│ ├── tsconfig.json
│ ├── README.md
│ └── package.json
├── output.png
├── compose.yaml
└── .docker
│ └── docker-compose.yaml
├── django
├── app
│ ├── example
│ │ ├── __init__.py
│ │ ├── wsgi.py
│ │ └── urls.py
│ ├── requirements.txt
│ ├── Dockerfile
│ └── manage.py
├── compose.yaml
└── .docker
│ └── docker-compose.yaml
├── flask
├── app
│ ├── requirements.txt
│ ├── app.py
│ └── Dockerfile
├── .docker
│ └── docker-compose.yaml
└── compose.yaml
├── .github
├── CODEOWNERS
└── workflows
│ └── codeql-analysis.yml
├── nginx-aspnet-mysql
├── db
│ └── password.txt
├── proxy
│ ├── Dockerfile
│ └── conf
├── backend
│ ├── aspnetapp.csproj
│ └── Dockerfile
├── .docker
│ └── docker-compose.yaml
└── compose.yaml
├── nginx-flask-mysql
├── db
│ └── password.txt
├── backend
│ ├── requirements.txt
│ └── Dockerfile
├── proxy
│ ├── Dockerfile
│ └── conf
└── .docker
│ └── docker-compose.yaml
├── nginx-golang-mysql
├── db
│ └── password.txt
├── proxy
│ └── nginx.conf
├── backend
│ ├── go.mod
│ ├── go.sum
│ └── Dockerfile
├── .docker
│ └── docker-compose.yaml
└── compose.yaml
├── react-express-mongodb
├── backend
│ ├── logs
│ │ └── .gitkeep
│ ├── .dockerignore
│ ├── config
│ │ ├── config.json
│ │ └── config.js
│ ├── models
│ │ └── todos
│ │ │ └── todo.js
│ ├── utils
│ │ └── helpers
│ │ │ ├── logger.js
│ │ │ └── responses.js
│ ├── Dockerfile
│ ├── server.js
│ ├── db
│ │ └── index.js
│ ├── package.json
│ └── routes
│ │ └── index.js
├── frontend
│ ├── .dockerignore
│ ├── public
│ │ ├── robots.txt
│ │ ├── favicon.ico
│ │ ├── logo192.png
│ │ ├── logo512.png
│ │ └── manifest.json
│ ├── src
│ │ ├── custom.scss
│ │ ├── App.test.js
│ │ ├── index.css
│ │ ├── App.scss
│ │ ├── index.js
│ │ └── components
│ │ │ ├── AddTodo.js
│ │ │ └── TodoList.js
│ ├── .gitignore
│ ├── README.md
│ ├── Dockerfile
│ └── package.json
├── .gitignore
├── output.png
├── .docker
│ └── docker-compose.yaml
└── compose.yaml
├── react-express-mysql
├── db
│ └── password.txt
├── .gitignore
├── output.png
├── frontend
│ ├── public
│ │ ├── robots.txt
│ │ ├── favicon.ico
│ │ ├── logo192.png
│ │ ├── logo512.png
│ │ └── manifest.json
│ ├── src
│ │ ├── setupTests.js
│ │ ├── setupProxy.js
│ │ ├── App.test.js
│ │ ├── index.css
│ │ ├── index.js
│ │ ├── App.css
│ │ └── App.js
│ ├── .gitignore
│ ├── Dockerfile
│ └── package.json
└── backend
│ ├── src
│ ├── database.js
│ └── config.js
│ ├── healthcheck.js
│ ├── test
│ └── sample.js
│ ├── package.json
│ └── LICENSE
├── react-java-mysql
├── db
│ └── password.txt
├── frontend
│ ├── .dockerignore
│ ├── src
│ │ ├── react-app-env.d.ts
│ │ ├── setupTests.ts
│ │ ├── setupProxy.js
│ │ ├── App.test.tsx
│ │ ├── index.css
│ │ ├── index.tsx
│ │ ├── App.css
│ │ └── App.tsx
│ ├── public
│ │ ├── robots.txt
│ │ ├── favicon.ico
│ │ ├── logo192.png
│ │ ├── logo512.png
│ │ └── manifest.json
│ ├── .gitignore
│ ├── tsconfig.json
│ ├── Dockerfile
│ └── package.json
├── backend
│ ├── src
│ │ └── main
│ │ │ ├── resources
│ │ │ ├── data.sql
│ │ │ ├── META-INF
│ │ │ │ └── spring.factories
│ │ │ ├── schema.sql
│ │ │ └── application.properties
│ │ │ └── java
│ │ │ └── com
│ │ │ └── company
│ │ │ └── project
│ │ │ ├── repository
│ │ │ └── GreetingRepository.java
│ │ │ ├── Application.java
│ │ │ ├── controllers
│ │ │ └── HomeController.java
│ │ │ └── configuration
│ │ │ └── DockerSecretsProcessor.java
│ └── Dockerfile
└── output.jpg
├── sparkjava-mysql
├── db
│ └── password.txt
├── compose.yaml
├── .docker
│ └── docker-compose.yaml
└── backend
│ └── Dockerfile
├── spring-postgres
├── db
│ └── password.txt
├── backend
│ ├── src
│ │ └── main
│ │ │ ├── resources
│ │ │ ├── data.sql
│ │ │ ├── schema.sql
│ │ │ ├── templates
│ │ │ │ └── home.ftlh
│ │ │ └── application.properties
│ │ │ └── java
│ │ │ └── com
│ │ │ └── company
│ │ │ └── project
│ │ │ ├── repository
│ │ │ └── GreetingRepository.java
│ │ │ ├── Application.java
│ │ │ ├── controllers
│ │ │ └── HomeController.java
│ │ │ └── entity
│ │ │ └── Greeting.java
│ └── Dockerfile
├── compose.yaml
└── .docker
│ └── docker-compose.yaml
├── flask-redis
├── requirements.txt
├── .docker
│ └── docker-compose.yaml
├── app.py
├── compose.yaml
└── Dockerfile
├── nginx-golang-postgres
├── db
│ └── password.txt
├── proxy
│ └── nginx.conf
├── backend
│ ├── go.mod
│ ├── go.sum
│ └── Dockerfile
├── compose.yaml
└── .docker
│ └── docker-compose.yaml
├── react-nginx
├── .gitignore
├── output.png
├── public
│ ├── robots.txt
│ ├── favicon.ico
│ ├── logo192.png
│ ├── logo512.png
│ └── manifest.json
├── .dockerignore
├── compose.yaml
├── src
│ ├── setupTests.js
│ ├── App.test.js
│ ├── index.css
│ ├── reportWebVitals.js
│ ├── index.js
│ ├── App.js
│ └── App.css
├── .docker
│ └── docker-compose.yaml
├── .nginx
│ └── nginx.conf
├── package.json
└── Dockerfile
├── react-rust-postgres
├── backend
│ ├── migrations
│ │ ├── .gitkeep
│ │ ├── 0001_create-users_down.sql
│ │ └── 0001_create-users_up.sql
│ ├── .dockerignore
│ ├── .gitignore
│ ├── readme.md
│ ├── Cargo.toml
│ ├── src
│ │ ├── user.rs
│ │ └── postgres.rs
│ └── Dockerfile
├── frontend
│ ├── .dockerignore
│ ├── public
│ │ ├── robots.txt
│ │ ├── favicon.ico
│ │ ├── logo192.png
│ │ ├── logo512.png
│ │ └── manifest.json
│ ├── src
│ │ ├── setupTests.js
│ │ ├── setupProxy.js
│ │ ├── App.test.js
│ │ ├── index.css
│ │ ├── index.js
│ │ ├── App.css
│ │ └── App.js
│ ├── .gitignore
│ ├── Dockerfile
│ └── package.json
├── capture.png
├── compose.yaml
└── .docker
│ └── docker-compose.yaml
├── aspnet-mssql
├── app
│ └── aspnetapp
│ │ ├── wwwroot
│ │ ├── js
│ │ │ ├── site.min.js
│ │ │ └── site.js
│ │ ├── favicon.ico
│ │ ├── lib
│ │ │ ├── bootstrap
│ │ │ │ ├── dist
│ │ │ │ │ ├── fonts
│ │ │ │ │ │ ├── glyphicons-halflings-regular.eot
│ │ │ │ │ │ ├── glyphicons-halflings-regular.ttf
│ │ │ │ │ │ ├── glyphicons-halflings-regular.woff
│ │ │ │ │ │ └── glyphicons-halflings-regular.woff2
│ │ │ │ │ └── js
│ │ │ │ │ │ └── npm.js
│ │ │ │ ├── .bower.json
│ │ │ │ └── LICENSE
│ │ │ ├── jquery-validation-unobtrusive
│ │ │ │ ├── .bower.json
│ │ │ │ └── LICENSE.txt
│ │ │ ├── jquery
│ │ │ │ └── .bower.json
│ │ │ └── jquery-validation
│ │ │ │ ├── .bower.json
│ │ │ │ └── LICENSE.md
│ │ └── css
│ │ │ ├── site.min.css
│ │ │ └── site.css
│ │ ├── Views
│ │ ├── _ViewStart.cshtml
│ │ ├── _ViewImports.cshtml
│ │ ├── Home
│ │ │ ├── Privacy.cshtml
│ │ │ ├── About.cshtml
│ │ │ └── Contact.cshtml
│ │ └── Shared
│ │ │ ├── Error.cshtml
│ │ │ └── _ValidationScriptsPartial.cshtml
│ │ ├── appsettings.json
│ │ ├── aspnetapp.csproj
│ │ ├── appsettings.Development.json
│ │ ├── Models
│ │ └── ErrorViewModel.cs
│ │ ├── Dockerfile
│ │ ├── Program.cs
│ │ └── Controllers
│ │ └── HomeController.cs
├── output.jpg
└── compose.yaml
├── nginx-nodejs-redis
├── web
│ ├── .gitignore
│ ├── Dockerfile
│ ├── package.json
│ └── server.js
├── nginx
│ ├── Dockerfile
│ └── nginx.conf
└── compose.yaml
├── plex
├── .env
└── compose.yaml
├── .gitattributes
├── wasmedge-kafka-mysql
├── db
│ └── db-password.txt
├── kafka
│ └── order.json
├── etl
│ ├── Cargo.toml
│ └── Dockerfile
├── compose.yml
└── .docker
│ └── docker-compose.yml
├── nginx-flask-mongo
├── flask
│ ├── requirements.txt
│ ├── server.py
│ └── Dockerfile
├── nginx
│ └── nginx.conf
├── .docker
│ └── docker-compose.yaml
└── compose.yaml
├── nginx-wsgi-flask
├── flask
│ ├── requirements.txt
│ ├── wsgi.py
│ ├── app.py
│ └── Dockerfile
├── nginx
│ ├── start.sh
│ ├── default.conf
│ └── Dockerfile
└── compose.yaml
├── apache-php
├── app
│ ├── index.php
│ └── Dockerfile
├── compose.yaml
└── .docker
│ └── docker-compose.yaml
├── awesome-compose.jpg
├── gitea-postgres
├── output.jpg
└── compose.yaml
├── wordpress-mysql
├── output.jpg
└── compose.yaml
├── sparkjava
├── compose.yaml
├── .docker
│ └── docker-compose.yaml
└── sparkjava
│ ├── src
│ └── main
│ │ └── java
│ │ └── App.java
│ └── Dockerfile
├── nextcloud-postgres
├── output.jpg
└── compose.yaml
├── prometheus-grafana
├── output.jpg
├── grafana
│ └── datasource.yml
├── prometheus
│ └── prometheus.yml
└── compose.yaml
├── nginx-golang
├── proxy
│ └── nginx.conf
├── backend
│ ├── go.mod
│ ├── go.sum
│ ├── main.go
│ └── Dockerfile
├── compose.yaml
└── .docker
│ └── docker-compose.yaml
├── nextcloud-redis-mariadb
├── output.jpg
└── compose.yaml
├── wireguard
├── .env
└── compose.yaml
├── minecraft
├── screenshots
│ ├── ready-to-play.png
│ ├── add-server-config.png
│ └── click-add-server.png
└── compose.yaml
├── postgresql-pgadmin
├── .env
└── compose.yaml
├── official-documentation-samples
├── rails
│ └── images
│ │ └── rails-welcome.png
├── django
│ └── images
│ │ └── django-it-worked.png
├── wordpress
│ └── images
│ │ ├── wordpress-lang.png
│ │ └── wordpress-welcome.png
└── README.md
├── wasmedge-mysql-nginx
├── db
│ ├── update_order.json
│ └── orders.json
├── backend
│ ├── Cargo.toml
│ └── Dockerfile
├── compose.yml
└── .docker
│ └── docker-compose.yml
├── pihole-cloudflared-DoH
└── .env
├── portainer
└── compose.yaml
├── elasticsearch-logstash-kibana
├── logstash
│ └── pipeline
│ │ └── logstash-nginx.config
└── compose.yaml
├── traefik-golang
├── backend
│ ├── main.go
│ └── Dockerfile
├── compose.yaml
└── .docker
│ └── docker-compose.yaml
├── open_in_new.svg
└── MAINTAINERS
/fastapi/app/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/vuejs/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
--------------------------------------------------------------------------------
/angular/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
--------------------------------------------------------------------------------
/django/app/example/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/angular/angular/src/assets/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/flask/app/requirements.txt:
--------------------------------------------------------------------------------
1 | flask
2 |
--------------------------------------------------------------------------------
/.github/CODEOWNERS:
--------------------------------------------------------------------------------
1 | * aiordache glours
2 |
--------------------------------------------------------------------------------
/angular/angular/src/app/app.component.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/nginx-aspnet-mysql/db/password.txt:
--------------------------------------------------------------------------------
1 | db-q5n2g
--------------------------------------------------------------------------------
/nginx-flask-mysql/db/password.txt:
--------------------------------------------------------------------------------
1 | db-78n9n
--------------------------------------------------------------------------------
/nginx-golang-mysql/db/password.txt:
--------------------------------------------------------------------------------
1 | db-q5n2g
--------------------------------------------------------------------------------
/react-express-mongodb/backend/logs/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/react-express-mysql/db/password.txt:
--------------------------------------------------------------------------------
1 | db-btf5q
--------------------------------------------------------------------------------
/react-java-mysql/db/password.txt:
--------------------------------------------------------------------------------
1 | db-57xsl
--------------------------------------------------------------------------------
/sparkjava-mysql/db/password.txt:
--------------------------------------------------------------------------------
1 | db-vp2lf
--------------------------------------------------------------------------------
/spring-postgres/db/password.txt:
--------------------------------------------------------------------------------
1 | db-wrz2z
--------------------------------------------------------------------------------
/angular/angular/.dockerignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 |
--------------------------------------------------------------------------------
/fastapi/requirements.txt:
--------------------------------------------------------------------------------
1 | fastapi
2 | uvicorn
3 |
--------------------------------------------------------------------------------
/flask-redis/requirements.txt:
--------------------------------------------------------------------------------
1 | flask
2 | redis
3 |
--------------------------------------------------------------------------------
/nginx-golang-postgres/db/password.txt:
--------------------------------------------------------------------------------
1 | db-frknz
--------------------------------------------------------------------------------
/react-express-mysql/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/react-nginx/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | build
--------------------------------------------------------------------------------
/react-rust-postgres/backend/migrations/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/aspnet-mssql/app/aspnetapp/wwwroot/js/site.min.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/nginx-nodejs-redis/web/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/plex/.env:
--------------------------------------------------------------------------------
1 | PLEX_MEDIA_PATH=/media/your/plex/path
2 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto
2 | readme.md merge=union
3 |
--------------------------------------------------------------------------------
/react-java-mysql/frontend/.dockerignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/wasmedge-kafka-mysql/db/db-password.txt:
--------------------------------------------------------------------------------
1 | whalehello
2 |
--------------------------------------------------------------------------------
/django/app/requirements.txt:
--------------------------------------------------------------------------------
1 | Django==3.2.13
2 | environs==7.3.1
--------------------------------------------------------------------------------
/nginx-flask-mongo/flask/requirements.txt:
--------------------------------------------------------------------------------
1 | pymongo
2 | flask
3 |
--------------------------------------------------------------------------------
/react-express-mongodb/backend/.dockerignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/react-rust-postgres/backend/.dockerignore:
--------------------------------------------------------------------------------
1 | target
2 | Cargo.lock
3 |
--------------------------------------------------------------------------------
/react-rust-postgres/backend/.gitignore:
--------------------------------------------------------------------------------
1 | target
2 | Cargo.lock
3 |
--------------------------------------------------------------------------------
/nginx-wsgi-flask/flask/requirements.txt:
--------------------------------------------------------------------------------
1 | Flask==1.1.1
2 | gunicorn==20.0.4
--------------------------------------------------------------------------------
/react-rust-postgres/frontend/.dockerignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | build
3 |
--------------------------------------------------------------------------------
/apache-php/app/index.php:
--------------------------------------------------------------------------------
1 | Hello World!';
3 | ?>
4 |
--------------------------------------------------------------------------------
/react-express-mongodb/frontend/.dockerignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | npm-debug.log
3 |
--------------------------------------------------------------------------------
/nginx-flask-mysql/backend/requirements.txt:
--------------------------------------------------------------------------------
1 | Flask==2.0.1
2 | mysql-connector==2.2.9
3 |
--------------------------------------------------------------------------------
/react-rust-postgres/backend/migrations/0001_create-users_down.sql:
--------------------------------------------------------------------------------
1 | DROP TABLE users;
2 |
--------------------------------------------------------------------------------
/aspnet-mssql/app/aspnetapp/Views/_ViewStart.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | Layout = "_Layout";
3 | }
4 |
--------------------------------------------------------------------------------
/react-java-mysql/frontend/src/react-app-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/vuejs/output.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/objects/awesome-compose/master/vuejs/output.jpg
--------------------------------------------------------------------------------
/angular/output.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/objects/awesome-compose/master/angular/output.png
--------------------------------------------------------------------------------
/awesome-compose.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/objects/awesome-compose/master/awesome-compose.jpg
--------------------------------------------------------------------------------
/nginx-aspnet-mysql/proxy/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM nginx:1.13-alpine
2 | COPY conf /etc/nginx/conf.d/default.conf
--------------------------------------------------------------------------------
/nginx-flask-mysql/proxy/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM nginx:1.13-alpine
2 | COPY conf /etc/nginx/conf.d/default.conf
--------------------------------------------------------------------------------
/spring-postgres/backend/src/main/resources/data.sql:
--------------------------------------------------------------------------------
1 | INSERT INTO GREETINGS(name) values ('Docker');
2 |
--------------------------------------------------------------------------------
/aspnet-mssql/output.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/objects/awesome-compose/master/aspnet-mssql/output.jpg
--------------------------------------------------------------------------------
/react-nginx/output.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/objects/awesome-compose/master/react-nginx/output.png
--------------------------------------------------------------------------------
/react-nginx/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/gitea-postgres/output.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/objects/awesome-compose/master/gitea-postgres/output.jpg
--------------------------------------------------------------------------------
/react-java-mysql/backend/src/main/resources/data.sql:
--------------------------------------------------------------------------------
1 | INSERT INTO example.greetings(name) values ('Docker');
2 |
--------------------------------------------------------------------------------
/wordpress-mysql/output.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/objects/awesome-compose/master/wordpress-mysql/output.jpg
--------------------------------------------------------------------------------
/angular/angular/src/environments/environment.prod.ts:
--------------------------------------------------------------------------------
1 | export const environment = {
2 | production: true
3 | };
4 |
--------------------------------------------------------------------------------
/angular/angular/src/styles.css:
--------------------------------------------------------------------------------
1 | /* You can add global styles to this file, and also import other style files */
2 |
--------------------------------------------------------------------------------
/react-express-mongodb/.gitignore:
--------------------------------------------------------------------------------
1 | frontend/node_modules/
2 | backend/node_modules/
3 | .idea/
4 | data
5 | *.log
6 |
--------------------------------------------------------------------------------
/react-java-mysql/output.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/objects/awesome-compose/master/react-java-mysql/output.jpg
--------------------------------------------------------------------------------
/sparkjava/compose.yaml:
--------------------------------------------------------------------------------
1 | services:
2 | sparkjava:
3 | build: sparkjava
4 | ports:
5 | - 8080:8080
6 |
--------------------------------------------------------------------------------
/angular/angular/src/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/objects/awesome-compose/master/angular/angular/src/favicon.ico
--------------------------------------------------------------------------------
/nextcloud-postgres/output.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/objects/awesome-compose/master/nextcloud-postgres/output.jpg
--------------------------------------------------------------------------------
/prometheus-grafana/output.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/objects/awesome-compose/master/prometheus-grafana/output.jpg
--------------------------------------------------------------------------------
/react-express-mysql/output.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/objects/awesome-compose/master/react-express-mysql/output.png
--------------------------------------------------------------------------------
/react-java-mysql/frontend/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/react-nginx/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/objects/awesome-compose/master/react-nginx/public/favicon.ico
--------------------------------------------------------------------------------
/react-nginx/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/objects/awesome-compose/master/react-nginx/public/logo192.png
--------------------------------------------------------------------------------
/react-nginx/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/objects/awesome-compose/master/react-nginx/public/logo512.png
--------------------------------------------------------------------------------
/react-rust-postgres/capture.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/objects/awesome-compose/master/react-rust-postgres/capture.png
--------------------------------------------------------------------------------
/vuejs/vuejs/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [
3 | '@vue/cli-plugin-babel/preset'
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/vuejs/vuejs/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/objects/awesome-compose/master/vuejs/vuejs/public/favicon.ico
--------------------------------------------------------------------------------
/vuejs/vuejs/src/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/objects/awesome-compose/master/vuejs/vuejs/src/assets/logo.png
--------------------------------------------------------------------------------
/nginx-golang/proxy/nginx.conf:
--------------------------------------------------------------------------------
1 | server {
2 | listen 80;
3 | location / {
4 | proxy_pass http://backend:80;
5 | }
6 | }
--------------------------------------------------------------------------------
/react-express-mongodb/frontend/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/react-express-mongodb/output.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/objects/awesome-compose/master/react-express-mongodb/output.png
--------------------------------------------------------------------------------
/react-express-mysql/frontend/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/react-rust-postgres/frontend/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/nextcloud-redis-mariadb/output.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/objects/awesome-compose/master/nextcloud-redis-mariadb/output.jpg
--------------------------------------------------------------------------------
/react-nginx/.dockerignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | npm-debug.log
3 | build
4 | .dockerignore
5 | **/.git
6 | **/.DS_Store
7 | **/node_modules
8 |
--------------------------------------------------------------------------------
/wireguard/.env:
--------------------------------------------------------------------------------
1 | TIMEZONE=Etc/UTC
2 | VPN_SERVER_URL=your-domain.dyndns.com # free examples http://www.duckdns.org/ and https://www.noip.com/
--------------------------------------------------------------------------------
/minecraft/screenshots/ready-to-play.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/objects/awesome-compose/master/minecraft/screenshots/ready-to-play.png
--------------------------------------------------------------------------------
/nginx-flask-mongo/nginx/nginx.conf:
--------------------------------------------------------------------------------
1 | server {
2 | listen 80;
3 | location / {
4 | proxy_pass http://$FLASK_SERVER_ADDR;
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/minecraft/screenshots/add-server-config.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/objects/awesome-compose/master/minecraft/screenshots/add-server-config.png
--------------------------------------------------------------------------------
/minecraft/screenshots/click-add-server.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/objects/awesome-compose/master/minecraft/screenshots/click-add-server.png
--------------------------------------------------------------------------------
/aspnet-mssql/app/aspnetapp/wwwroot/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/objects/awesome-compose/master/aspnet-mssql/app/aspnetapp/wwwroot/favicon.ico
--------------------------------------------------------------------------------
/django/compose.yaml:
--------------------------------------------------------------------------------
1 | services:
2 | web:
3 | build:
4 | context: app
5 | target: builder
6 | ports:
7 | - '8000:8000'
8 |
--------------------------------------------------------------------------------
/nginx-nodejs-redis/nginx/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM nginx:1.21.6
2 | RUN rm /etc/nginx/conf.d/default.conf
3 | COPY nginx.conf /etc/nginx/conf.d/default.conf
4 |
--------------------------------------------------------------------------------
/postgresql-pgadmin/.env:
--------------------------------------------------------------------------------
1 | POSTGRES_USER=yourUser
2 | POSTGRES_PW=changeit
3 | POSTGRES_DB=postgres
4 | PGADMIN_MAIL=your@email.com
5 | PGADMIN_PW=changeit
--------------------------------------------------------------------------------
/react-java-mysql/frontend/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/objects/awesome-compose/master/react-java-mysql/frontend/public/favicon.ico
--------------------------------------------------------------------------------
/react-java-mysql/frontend/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/objects/awesome-compose/master/react-java-mysql/frontend/public/logo192.png
--------------------------------------------------------------------------------
/react-java-mysql/frontend/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/objects/awesome-compose/master/react-java-mysql/frontend/public/logo512.png
--------------------------------------------------------------------------------
/aspnet-mssql/app/aspnetapp/Views/_ViewImports.cshtml:
--------------------------------------------------------------------------------
1 | @using aspnetapp
2 | @using aspnetapp.Models
3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
4 |
--------------------------------------------------------------------------------
/react-express-mysql/frontend/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/objects/awesome-compose/master/react-express-mysql/frontend/public/favicon.ico
--------------------------------------------------------------------------------
/react-express-mysql/frontend/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/objects/awesome-compose/master/react-express-mysql/frontend/public/logo192.png
--------------------------------------------------------------------------------
/react-express-mysql/frontend/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/objects/awesome-compose/master/react-express-mysql/frontend/public/logo512.png
--------------------------------------------------------------------------------
/react-nginx/compose.yaml:
--------------------------------------------------------------------------------
1 | services:
2 | frontend:
3 | build:
4 | context: .
5 | container_name: frontend
6 | ports:
7 | - "80:80"
8 |
--------------------------------------------------------------------------------
/react-rust-postgres/backend/migrations/0001_create-users_up.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE users (
2 | id SERIAL PRIMARY KEY,
3 | login TEXT UNIQUE NOT NULL
4 | );
5 |
--------------------------------------------------------------------------------
/react-rust-postgres/frontend/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/objects/awesome-compose/master/react-rust-postgres/frontend/public/favicon.ico
--------------------------------------------------------------------------------
/react-rust-postgres/frontend/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/objects/awesome-compose/master/react-rust-postgres/frontend/public/logo192.png
--------------------------------------------------------------------------------
/react-rust-postgres/frontend/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/objects/awesome-compose/master/react-rust-postgres/frontend/public/logo512.png
--------------------------------------------------------------------------------
/fastapi/app/main.py:
--------------------------------------------------------------------------------
1 | from fastapi import FastAPI
2 |
3 | app = FastAPI()
4 |
5 |
6 | @app.get("/")
7 | def hello_world():
8 | return {"message": "OK"}
9 |
--------------------------------------------------------------------------------
/nginx-golang/backend/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/docker/awesome-compose/nginx-golang/backend
2 |
3 | go 1.18
4 |
5 | require github.com/go-chi/chi/v5 v5.0.7
6 |
--------------------------------------------------------------------------------
/nginx-wsgi-flask/nginx/start.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | envsubst '$FLASK_SERVER_ADDR' < /tmp/default.conf > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'
3 |
--------------------------------------------------------------------------------
/react-express-mongodb/frontend/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/objects/awesome-compose/master/react-express-mongodb/frontend/public/favicon.ico
--------------------------------------------------------------------------------
/react-express-mongodb/frontend/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/objects/awesome-compose/master/react-express-mongodb/frontend/public/logo192.png
--------------------------------------------------------------------------------
/react-express-mongodb/frontend/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/objects/awesome-compose/master/react-express-mongodb/frontend/public/logo512.png
--------------------------------------------------------------------------------
/spring-postgres/backend/src/main/resources/schema.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE IF NOT EXISTS GREETINGS (
2 | id serial PRIMARY KEY,
3 | name varchar(50) NOT NULL
4 | );
5 |
--------------------------------------------------------------------------------
/wasmedge-kafka-mysql/kafka/order.json:
--------------------------------------------------------------------------------
1 | {"order_id": 1,"product_id": 12,"quantity": 2,"amount": 56.0,"shipping": 15.0,"tax": 2.0,"shipping_address": "Mataderos 2312"}
2 |
--------------------------------------------------------------------------------
/aspnet-mssql/app/aspnetapp/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Warning"
5 | }
6 | },
7 | "AllowedHosts": "*"
8 | }
9 |
--------------------------------------------------------------------------------
/official-documentation-samples/rails/images/rails-welcome.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/objects/awesome-compose/master/official-documentation-samples/rails/images/rails-welcome.png
--------------------------------------------------------------------------------
/nginx-aspnet-mysql/proxy/conf:
--------------------------------------------------------------------------------
1 | server {
2 | listen 80;
3 | server_name localhost;
4 | location / {
5 | proxy_pass http://backend:8000;
6 | }
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/nginx-flask-mysql/proxy/conf:
--------------------------------------------------------------------------------
1 | server {
2 | listen 80;
3 | server_name localhost;
4 | location / {
5 | proxy_pass http://backend:8000;
6 | }
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/react-java-mysql/backend/src/main/resources/META-INF/spring.factories:
--------------------------------------------------------------------------------
1 | org.springframework.boot.env.EnvironmentPostProcessor=com.company.project.configuration.DockerSecretsProcessor
2 |
--------------------------------------------------------------------------------
/aspnet-mssql/app/aspnetapp/aspnetapp.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | net5.0
4 |
5 |
--------------------------------------------------------------------------------
/nginx-wsgi-flask/flask/wsgi.py:
--------------------------------------------------------------------------------
1 | from app import app
2 | import os
3 |
4 | if __name__ == "__main__":
5 | app.run(host='0.0.0.0', port=os.environ.get("FLASK_SERVER_PORT"), debug=True)
6 |
--------------------------------------------------------------------------------
/official-documentation-samples/django/images/django-it-worked.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/objects/awesome-compose/master/official-documentation-samples/django/images/django-it-worked.png
--------------------------------------------------------------------------------
/official-documentation-samples/wordpress/images/wordpress-lang.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/objects/awesome-compose/master/official-documentation-samples/wordpress/images/wordpress-lang.png
--------------------------------------------------------------------------------
/vuejs/vuejs/src/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './App.vue'
3 |
4 | Vue.config.productionTip = false
5 |
6 | new Vue({
7 | render: h => h(App),
8 | }).$mount('#app')
9 |
--------------------------------------------------------------------------------
/nginx-golang/backend/go.sum:
--------------------------------------------------------------------------------
1 | github.com/go-chi/chi/v5 v5.0.7 h1:rDTPXLDHGATaeHvVlLcR4Qe0zftYethFucbjVQ1PxU8=
2 | github.com/go-chi/chi/v5 v5.0.7/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
3 |
--------------------------------------------------------------------------------
/official-documentation-samples/wordpress/images/wordpress-welcome.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/objects/awesome-compose/master/official-documentation-samples/wordpress/images/wordpress-welcome.png
--------------------------------------------------------------------------------
/apache-php/compose.yaml:
--------------------------------------------------------------------------------
1 | services:
2 | web:
3 | build:
4 | context: app
5 | target: builder
6 | ports:
7 | - '80:80'
8 | volumes:
9 | - ./app:/var/www/html/
10 |
--------------------------------------------------------------------------------
/react-java-mysql/backend/src/main/resources/schema.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE IF NOT EXISTS example.greetings (
2 | id INTEGER AUTO_INCREMENT,
3 | name varchar(50) NOT NULL,
4 | PRIMARY KEY (id)
5 | );
6 |
--------------------------------------------------------------------------------
/aspnet-mssql/app/aspnetapp/Views/Home/Privacy.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | ViewData["Title"] = "Privacy Policy";
3 | }
4 |
@ViewData["Title"]
5 |
6 | Use this page to detail your site's privacy policy.
7 |
--------------------------------------------------------------------------------
/react-express-mysql/backend/src/database.js:
--------------------------------------------------------------------------------
1 | const knex = require('knex');
2 | const { database } = require('./config');
3 |
4 | module.exports = knex({
5 | client: 'mysql2',
6 | connection: database,
7 | });
8 |
--------------------------------------------------------------------------------
/nginx-nodejs-redis/web/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM node:14.17.3-alpine3.14
2 |
3 | WORKDIR /usr/src/app
4 |
5 | COPY package.json package-lock.json ./
6 | RUN npm ci
7 | COPY ./server.js ./
8 |
9 | CMD ["npm","start"]
10 |
--------------------------------------------------------------------------------
/flask/app/app.py:
--------------------------------------------------------------------------------
1 | from flask import Flask
2 | app = Flask(__name__)
3 |
4 | @app.route('/')
5 | def hello():
6 | return "Hello World!"
7 |
8 | if __name__ == '__main__':
9 | app.run(host='0.0.0.0', port=8000)
10 |
--------------------------------------------------------------------------------
/aspnet-mssql/app/aspnetapp/Views/Home/About.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | ViewData["Title"] = "About";
3 | }
4 | @ViewData["Title"]
5 | @ViewData["Message"]
6 |
7 | Use this area to provide additional information.
8 |
--------------------------------------------------------------------------------
/django/.docker/docker-compose.yaml:
--------------------------------------------------------------------------------
1 | services:
2 | web:
3 | build:
4 | context: app
5 | target: dev-envs
6 | ports:
7 | - '8000:8000'
8 | volumes:
9 | - /var/run/docker.sock:/var/run/docker.sock
--------------------------------------------------------------------------------
/nginx-golang-mysql/proxy/nginx.conf:
--------------------------------------------------------------------------------
1 | server {
2 | listen 80;
3 | server_name localhost;
4 | location / {
5 | proxy_pass http://backend:8000;
6 | proxy_http_version 1.1;
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/aspnet-mssql/app/aspnetapp/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Debug",
5 | "System": "Information",
6 | "Microsoft": "Information"
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/prometheus-grafana/grafana/datasource.yml:
--------------------------------------------------------------------------------
1 | apiVersion: 1
2 |
3 | datasources:
4 | - name: Prometheus
5 | type: prometheus
6 | url: http://prometheus:9090
7 | isDefault: true
8 | access: proxy
9 | editable: true
10 |
--------------------------------------------------------------------------------
/angular/compose.yaml:
--------------------------------------------------------------------------------
1 | services:
2 | web:
3 | build:
4 | context: angular
5 | target: builder
6 | ports:
7 | - 4200:4200
8 | volumes:
9 | - ./angular:/project
10 | - /project/node_modules
11 |
--------------------------------------------------------------------------------
/react-rust-postgres/backend/readme.md:
--------------------------------------------------------------------------------
1 | # Backend
2 |
3 | This backend is made with Rust using [actix-web](https://actix.rs/) as a web server and [deadpool-postgres](https://crates.io/crates/deadpool-postgres) as a connection manager.
4 |
5 |
--------------------------------------------------------------------------------
/vuejs/.docker/docker-compose.yaml:
--------------------------------------------------------------------------------
1 | services:
2 | web:
3 | build:
4 | context: vuejs
5 | target: dev-envs
6 | ports:
7 | - 8080:8080
8 | volumes:
9 | - /var/run/docker.sock:/var/run/docker.sock
10 |
--------------------------------------------------------------------------------
/vuejs/compose.yaml:
--------------------------------------------------------------------------------
1 | services:
2 | web:
3 | build:
4 | context: vuejs
5 | target: development
6 | ports:
7 | - 8080:8080
8 | volumes:
9 | - ./vuejs:/project
10 | - /project/node_modules
11 |
--------------------------------------------------------------------------------
/aspnet-mssql/app/aspnetapp/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/objects/awesome-compose/master/aspnet-mssql/app/aspnetapp/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/aspnet-mssql/app/aspnetapp/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/objects/awesome-compose/master/aspnet-mssql/app/aspnetapp/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/aspnet-mssql/app/aspnetapp/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/objects/awesome-compose/master/aspnet-mssql/app/aspnetapp/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/aspnet-mssql/app/aspnetapp/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/objects/awesome-compose/master/aspnet-mssql/app/aspnetapp/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2
--------------------------------------------------------------------------------
/nginx-golang-postgres/proxy/nginx.conf:
--------------------------------------------------------------------------------
1 | server {
2 | listen 80;
3 | server_name localhost;
4 | location / {
5 | proxy_pass http://backend:8000;
6 | proxy_http_version 1.1;
7 | }
8 |
9 | }
10 |
--------------------------------------------------------------------------------
/wasmedge-mysql-nginx/db/update_order.json:
--------------------------------------------------------------------------------
1 | {
2 | "order_id": 3,
3 | "product_id": 12,
4 | "quantity": 2,
5 | "amount": 56.0,
6 | "shipping": 15.0,
7 | "tax": 2.0,
8 | "shipping_address": "123 Main Street"
9 | }
10 |
--------------------------------------------------------------------------------
/sparkjava/.docker/docker-compose.yaml:
--------------------------------------------------------------------------------
1 | services:
2 | sparkjava:
3 | build:
4 | context: sparkjava
5 | target: dev-envs
6 | ports:
7 | - 8080:8080
8 | volumes:
9 | - /var/run/docker.sock:/var/run/docker.sock
10 |
--------------------------------------------------------------------------------
/fastapi/compose.yaml:
--------------------------------------------------------------------------------
1 | services:
2 | api:
3 | build:
4 | context: .
5 | target: builder
6 | container_name: fastapi-application
7 | environment:
8 | PORT: 8000
9 | ports:
10 | - '8000:8000'
11 | restart: "no"
12 |
--------------------------------------------------------------------------------
/nginx-nodejs-redis/nginx/nginx.conf:
--------------------------------------------------------------------------------
1 | upstream loadbalancer {
2 | server web1:5000;
3 | server web2:5000;
4 | }
5 |
6 | server {
7 | listen 80;
8 | server_name localhost;
9 | location / {
10 | proxy_pass http://loadbalancer;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/plex/compose.yaml:
--------------------------------------------------------------------------------
1 | services:
2 | plex:
3 | image: linuxserver/plex
4 | container_name: plex
5 | network_mode: host
6 | environment:
7 | - VERSION=docker
8 | restart: always
9 | volumes:
10 | - ${PLEX_MEDIA_PATH}:/media/
--------------------------------------------------------------------------------
/react-express-mongodb/frontend/src/custom.scss:
--------------------------------------------------------------------------------
1 | // Override default variables before the import
2 | $body-bg: #fff;
3 | // Import Bootstrap and its default variables
4 | @import '~bootstrap/scss/bootstrap.scss';
5 |
6 | .cursor-pointer {
7 | cursor: pointer;
8 | }
--------------------------------------------------------------------------------
/sparkjava/sparkjava/src/main/java/App.java:
--------------------------------------------------------------------------------
1 | import static spark.Spark.*;
2 |
3 | public class App {
4 | public static void main(String[] args) {
5 | port(8080);
6 |
7 | get("/", (req, res) -> "Hello from Docker!");
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/flask/.docker/docker-compose.yaml:
--------------------------------------------------------------------------------
1 | services:
2 | web:
3 | build:
4 | context: app
5 | target: dev-envs
6 | stop_signal: SIGINT
7 | ports:
8 | - '8000:8000'
9 | volumes:
10 | - /var/run/docker.sock:/var/run/docker.sock
11 |
--------------------------------------------------------------------------------
/react-express-mongodb/backend/config/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "test":{
3 | "PORT": 3000,
4 | "MONGODB_URI": "mongodb://mongo:27017/TodoAppTest"
5 | },
6 | "development":{
7 | "PORT": 3000,
8 | "MONGODB_URI": "mongodb://mongo:27017/TodoApp"
9 | }
10 | }
--------------------------------------------------------------------------------
/apache-php/.docker/docker-compose.yaml:
--------------------------------------------------------------------------------
1 | services:
2 | web:
3 | build:
4 | context: app
5 | target: dev-envs
6 | ports:
7 | - '80:80'
8 | volumes:
9 | - /var/run/docker.sock:/var/run/docker.sock
10 | - ./app:/var/www/html/
11 |
--------------------------------------------------------------------------------
/aspnet-mssql/app/aspnetapp/wwwroot/js/site.js:
--------------------------------------------------------------------------------
1 | // Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification
2 | // for details on configuring this project to bundle and minify static web assets.
3 |
4 | // Write your JavaScript code.
5 |
--------------------------------------------------------------------------------
/flask/compose.yaml:
--------------------------------------------------------------------------------
1 | services:
2 | web:
3 | build:
4 | context: app
5 | target: builder
6 | # flask requires SIGINT to stop gracefully
7 | # (default stop signal from Compose is SIGTERM)
8 | stop_signal: SIGINT
9 | ports:
10 | - '8000:8000'
11 |
--------------------------------------------------------------------------------
/react-nginx/src/setupTests.js:
--------------------------------------------------------------------------------
1 | // jest-dom adds custom jest matchers for asserting on DOM nodes.
2 | // allows you to do things like:
3 | // expect(element).toHaveTextContent(/react/i)
4 | // learn more: https://github.com/testing-library/jest-dom
5 | import '@testing-library/jest-dom';
6 |
--------------------------------------------------------------------------------
/angular/angular/src/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-root',
5 | templateUrl: './app.component.html',
6 | styleUrls: ['./app.component.css']
7 | })
8 | export class AppComponent {
9 | title = 'angular';
10 | }
11 |
--------------------------------------------------------------------------------
/pihole-cloudflared-DoH/.env:
--------------------------------------------------------------------------------
1 | TIMEZONE=Etc/UTC
2 | PIHOLE_PW=changeit
3 | # Default values for CONDITIONAL_FORWARDING with AVM FRITZ!Box
4 | PIHOLE_ROUTER_IP=192.168.178.1
5 | PIHOLE_NETWORK_DOMAIN=fritz.box
6 | PIHOLE_REVERSE_DNS=192.168.178.0/24
7 | PIHOLE_HOST_IP=192.168.178.X
8 | PIHOLE_HOST_IPV6=
9 |
--------------------------------------------------------------------------------
/react-nginx/src/App.test.js:
--------------------------------------------------------------------------------
1 | import { render, screen } from '@testing-library/react';
2 | import App from './App';
3 |
4 | test('renders learn react link', () => {
5 | render( );
6 | const linkElement = screen.getByText(/learn react/i);
7 | expect(linkElement).toBeInTheDocument();
8 | });
9 |
--------------------------------------------------------------------------------
/aspnet-mssql/app/aspnetapp/Models/ErrorViewModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace aspnetapp.Models
4 | {
5 | public class ErrorViewModel
6 | {
7 | public string RequestId { get; set; }
8 |
9 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
10 | }
11 | }
--------------------------------------------------------------------------------
/react-nginx/.docker/docker-compose.yaml:
--------------------------------------------------------------------------------
1 | services:
2 | frontend:
3 | build:
4 | context: .
5 | target: dev-envs
6 | container_name: frontend
7 | ports:
8 | - "80:3000"
9 | - "3000:3000"
10 | volumes:
11 | - /var/run/docker.sock:/var/run/docker.sock
12 |
--------------------------------------------------------------------------------
/angular/.docker/docker-compose.yaml:
--------------------------------------------------------------------------------
1 | services:
2 | web:
3 | build:
4 | context: angular
5 | target: dev-envs
6 | ports:
7 | - 4200:4200
8 | volumes:
9 | - /var/run/docker.sock:/var/run/docker.sock
10 | - ./angular:/project
11 | - /project/node_modules
12 |
--------------------------------------------------------------------------------
/minecraft/compose.yaml:
--------------------------------------------------------------------------------
1 | services:
2 | minecraft:
3 | image: itzg/minecraft-server
4 | ports:
5 | - "25565:25565"
6 | environment:
7 | EULA: "TRUE"
8 | deploy:
9 | resources:
10 | limits:
11 | memory: 1.5G
12 | volumes:
13 | - "~/minecraft_data:/data"
14 |
--------------------------------------------------------------------------------
/react-java-mysql/frontend/src/setupTests.ts:
--------------------------------------------------------------------------------
1 | // jest-dom adds custom jest matchers for asserting on DOM nodes.
2 | // allows you to do things like:
3 | // expect(element).toHaveTextContent(/react/i)
4 | // learn more: https://github.com/testing-library/jest-dom
5 | import '@testing-library/jest-dom/extend-expect';
6 |
--------------------------------------------------------------------------------
/spring-postgres/backend/src/main/resources/templates/home.ftlh:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Getting Started: Serving Web Content
5 |
6 |
7 |
8 | Hello from ${name}!
9 |
10 |
--------------------------------------------------------------------------------
/react-express-mysql/frontend/src/setupTests.js:
--------------------------------------------------------------------------------
1 | // jest-dom adds custom jest matchers for asserting on DOM nodes.
2 | // allows you to do things like:
3 | // expect(element).toHaveTextContent(/react/i)
4 | // learn more: https://github.com/testing-library/jest-dom
5 | import '@testing-library/jest-dom/extend-expect';
6 |
--------------------------------------------------------------------------------
/react-rust-postgres/frontend/src/setupTests.js:
--------------------------------------------------------------------------------
1 | // jest-dom adds custom jest matchers for asserting on DOM nodes.
2 | // allows you to do things like:
3 | // expect(element).toHaveTextContent(/react/i)
4 | // learn more: https://github.com/testing-library/jest-dom
5 | import '@testing-library/jest-dom/extend-expect';
6 |
--------------------------------------------------------------------------------
/aspnet-mssql/app/aspnetapp/wwwroot/css/site.min.css:
--------------------------------------------------------------------------------
1 | body{padding-top:50px;padding-bottom:20px}.body-content{padding-left:15px;padding-right:15px}.carousel-caption p{font-size:20px;line-height:1.4}.carousel-inner .item img[src$=".svg"]{width:100%}#qrCode{margin:15px}@media screen and (max-width:767px){.carousel-caption{display:none}}
--------------------------------------------------------------------------------
/nginx-golang-postgres/backend/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/docker/awesome-compose/nginx-golang-postgres/backend
2 |
3 | go 1.18
4 |
5 | require (
6 | github.com/gorilla/handlers v1.3.0
7 | github.com/gorilla/mux v1.6.2
8 | github.com/lib/pq v1.10.3
9 | )
10 |
11 | require github.com/gorilla/context v1.1.1 // indirect
12 |
--------------------------------------------------------------------------------
/react-express-mysql/frontend/src/setupProxy.js:
--------------------------------------------------------------------------------
1 | const { createProxyMiddleware } = require("http-proxy-middleware");
2 |
3 | module.exports = function(app) {
4 | app.use(
5 | "/api",
6 | createProxyMiddleware({
7 | target: "http://backend",
8 | pathRewrite: { "^/api": "" }
9 | })
10 | );
11 | };
12 |
--------------------------------------------------------------------------------
/angular/angular/src/app/app-routing.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { RouterModule, Routes } from '@angular/router';
3 |
4 | const routes: Routes = [];
5 |
6 | @NgModule({
7 | imports: [RouterModule.forRoot(routes)],
8 | exports: [RouterModule]
9 | })
10 | export class AppRoutingModule { }
11 |
--------------------------------------------------------------------------------
/nginx-golang-mysql/backend/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/docker/awesome-compose/nginx-golang-mysql/backend
2 |
3 | go 1.18
4 |
5 | require (
6 | github.com/go-sql-driver/mysql v1.6.0
7 | github.com/gorilla/handlers v1.5.1
8 | github.com/gorilla/mux v1.8.0
9 | )
10 |
11 | require github.com/felixge/httpsnoop v1.0.1 // indirect
12 |
--------------------------------------------------------------------------------
/react-express-mongodb/frontend/src/App.test.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | it('renders without crashing', () => {
6 | const div = document.createElement('div');
7 | ReactDOM.render( , div);
8 | ReactDOM.unmountComponentAtNode(div);
9 | });
10 |
--------------------------------------------------------------------------------
/react-java-mysql/frontend/src/setupProxy.js:
--------------------------------------------------------------------------------
1 | const { createProxyMiddleware } = require("http-proxy-middleware");
2 |
3 | module.exports = function(app) {
4 | app.use(
5 | "/api",
6 | createProxyMiddleware({
7 | target: "http://backend:8080",
8 | pathRewrite: { "^/api": "" }
9 | })
10 | );
11 | };
12 |
--------------------------------------------------------------------------------
/react-rust-postgres/frontend/src/setupProxy.js:
--------------------------------------------------------------------------------
1 | const { createProxyMiddleware } = require("http-proxy-middleware");
2 |
3 | module.exports = function(app) {
4 | app.use(
5 | "/api",
6 | createProxyMiddleware({
7 | target: "http://backend:8000",
8 | pathRewrite: { "^/api": "" }
9 | })
10 | );
11 | };
12 |
--------------------------------------------------------------------------------
/react-express-mongodb/backend/models/todos/todo.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created by Syed Afzal
3 | */
4 | const mongoose = require('mongoose');
5 |
6 | const Todo = mongoose.model('Todo', {
7 | text : {
8 | type: String,
9 | trim: true,
10 | required: true
11 | }
12 | });
13 |
14 | module.exports = {Todo};
15 |
--------------------------------------------------------------------------------
/fastapi/.docker/docker-compose.yaml:
--------------------------------------------------------------------------------
1 | services:
2 | api:
3 | build:
4 | context: .
5 | target: dev-envs
6 | container_name: fastapi-application
7 | environment:
8 | PORT: 8000
9 | ports:
10 | - '8000:8000'
11 | volumes:
12 | - /var/run/docker.sock:/var/run/docker.sock
13 | restart: "no"
14 |
--------------------------------------------------------------------------------
/nginx-aspnet-mysql/backend/aspnetapp.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | net6.0
4 | enable
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/react-java-mysql/frontend/src/App.test.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { render } from '@testing-library/react';
3 | import App from './App';
4 |
5 | test('renders learn react link', () => {
6 | const { getByText } = render( );
7 | const linkElement = getByText(/learn react/i);
8 | expect(linkElement).toBeInTheDocument();
9 | });
10 |
--------------------------------------------------------------------------------
/react-express-mysql/frontend/src/App.test.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { render } from '@testing-library/react';
3 | import App from './App';
4 |
5 | test('renders learn react link', () => {
6 | const { getByText } = render( );
7 | const linkElement = getByText(/learn react/i);
8 | expect(linkElement).toBeInTheDocument();
9 | });
10 |
--------------------------------------------------------------------------------
/react-nginx/.nginx/nginx.conf:
--------------------------------------------------------------------------------
1 | server {
2 |
3 | listen 80;
4 |
5 | location / {
6 | root /usr/share/nginx/html;
7 | index index.html index.htm;
8 | try_files $uri /index.html =404;
9 | }
10 |
11 | error_page 500 502 503 504 /50x.html;
12 |
13 | location = /50x.html {
14 | root /usr/share/nginx/html;
15 | }
16 | }
17 |
18 |
--------------------------------------------------------------------------------
/react-rust-postgres/frontend/src/App.test.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { render } from '@testing-library/react';
3 | import App from './App';
4 |
5 | test('renders learn react link', () => {
6 | const { getByText } = render( );
7 | const linkElement = getByText(/learn react/i);
8 | expect(linkElement).toBeInTheDocument();
9 | });
10 |
--------------------------------------------------------------------------------
/react-express-mongodb/backend/utils/helpers/logger.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 | const filename = path.join(__dirname, '../../logs/project.log');
3 |
4 | //you can change format according to you
5 | const log = require('simple-node-logger').createSimpleLogger( {
6 | logFilePath:filename,
7 | timestampFormat:'YYYY-MM-DD HH:mm:ss'}
8 | );
9 | module.exports = {log};
--------------------------------------------------------------------------------
/angular/angular/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see https://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 2
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.ts]
12 | quote_type = single
13 |
14 | [*.md]
15 | max_line_length = off
16 | trim_trailing_whitespace = false
17 |
--------------------------------------------------------------------------------
/angular/angular/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Angular
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/angular/angular/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */
2 | {
3 | "extends": "./tsconfig.json",
4 | "compilerOptions": {
5 | "outDir": "./out-tsc/app",
6 | "types": []
7 | },
8 | "files": [
9 | "src/main.ts",
10 | "src/polyfills.ts"
11 | ],
12 | "include": [
13 | "src/**/*.d.ts"
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/nginx-nodejs-redis/web/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "web",
3 | "version": "1.0.0",
4 | "description": "Running Node.js and Express.js on Docker",
5 | "main": "server.js",
6 | "scripts": {
7 | "start": "node server.js"
8 | },
9 | "dependencies": {
10 | "express": "^4.17.2",
11 | "redis": "3.1.2"
12 | },
13 | "author": "",
14 | "license": "MIT"
15 | }
16 |
--------------------------------------------------------------------------------
/react-express-mongodb/backend/config/config.js:
--------------------------------------------------------------------------------
1 | const env = process.env.NODE_ENV || "development";
2 |
3 | if (env === "development" || env === "test") {
4 | const config = require("./config.json");
5 | const envConfig = config[env];
6 | console.log(envConfig);
7 |
8 | Object.keys(envConfig).forEach((key) => {
9 | process.env[key] = envConfig[key];
10 | });
11 | }
12 |
--------------------------------------------------------------------------------
/portainer/compose.yaml:
--------------------------------------------------------------------------------
1 | services:
2 | portainer:
3 | image: portainer/portainer-ce:alpine
4 | container_name: portainer
5 | command: -H unix:///var/run/docker.sock
6 | ports:
7 | - "9000:9000"
8 | volumes:
9 | - "/var/run/docker.sock:/var/run/docker.sock"
10 | - "portainer_data:/data"
11 | restart: always
12 |
13 | volumes:
14 | portainer_data:
--------------------------------------------------------------------------------
/flask-redis/.docker/docker-compose.yaml:
--------------------------------------------------------------------------------
1 | services:
2 | redis:
3 | image: redislabs/redismod
4 | ports:
5 | - '6379:6379'
6 | web:
7 | build:
8 | context: .
9 | target: dev-envs
10 | stop_signal: SIGINT
11 | ports:
12 | - '8000:8000'
13 | volumes:
14 | - /var/run/docker.sock:/var/run/docker.sock
15 | depends_on:
16 | - redis
17 |
--------------------------------------------------------------------------------
/nginx-golang/compose.yaml:
--------------------------------------------------------------------------------
1 | services:
2 | proxy:
3 | image: nginx
4 | volumes:
5 | - type: bind
6 | source: ./proxy/nginx.conf
7 | target: /etc/nginx/conf.d/default.conf
8 | read_only: true
9 | ports:
10 | - 80:80
11 | depends_on:
12 | - backend
13 |
14 | backend:
15 | build:
16 | context: backend
17 | target: builder
18 |
--------------------------------------------------------------------------------
/react-java-mysql/backend/src/main/java/com/company/project/repository/GreetingRepository.java:
--------------------------------------------------------------------------------
1 | package com.company.project.repository;
2 |
3 | import com.company.project.entity.Greeting;
4 | import org.springframework.data.repository.CrudRepository;
5 | import org.springframework.stereotype.Repository;
6 |
7 | @Repository
8 | public interface GreetingRepository extends CrudRepository {
9 | }
--------------------------------------------------------------------------------
/spring-postgres/backend/src/main/java/com/company/project/repository/GreetingRepository.java:
--------------------------------------------------------------------------------
1 | package com.company.project.repository;
2 |
3 | import com.company.project.entity.Greeting;
4 | import org.springframework.data.repository.CrudRepository;
5 | import org.springframework.stereotype.Repository;
6 |
7 | @Repository
8 | public interface GreetingRepository extends CrudRepository {
9 | }
10 |
--------------------------------------------------------------------------------
/flask-redis/app.py:
--------------------------------------------------------------------------------
1 | from flask import Flask
2 | from redis import Redis
3 |
4 | app = Flask(__name__)
5 | redis = Redis(host='redis', port=6379)
6 |
7 | @app.route('/')
8 | def hello():
9 | redis.incr('hits')
10 | counter = str(redis.get('hits'),'utf-8')
11 | return "This webpage has been viewed "+counter+" time(s)"
12 |
13 | if __name__ == "__main__":
14 | app.run(host="0.0.0.0", port=8000, debug=True)
15 |
--------------------------------------------------------------------------------
/vuejs/vuejs/README.md:
--------------------------------------------------------------------------------
1 | # vuejs
2 |
3 | ## Project setup
4 | ```
5 | yarn install
6 | ```
7 |
8 | ### Compiles and hot-reloads for development
9 | ```
10 | yarn serve
11 | ```
12 |
13 | ### Compiles and minifies for production
14 | ```
15 | yarn build
16 | ```
17 |
18 | ### Lints and fixes files
19 | ```
20 | yarn lint
21 | ```
22 |
23 | ### Customize configuration
24 | See [Configuration Reference](https://cli.vuejs.org/config/).
25 |
--------------------------------------------------------------------------------
/angular/angular/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */
2 | {
3 | "extends": "./tsconfig.json",
4 | "compilerOptions": {
5 | "outDir": "./out-tsc/spec",
6 | "types": [
7 | "jasmine"
8 | ]
9 | },
10 | "files": [
11 | "src/test.ts",
12 | "src/polyfills.ts"
13 | ],
14 | "include": [
15 | "src/**/*.spec.ts",
16 | "src/**/*.d.ts"
17 | ]
18 | }
19 |
--------------------------------------------------------------------------------
/react-nginx/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
5 | sans-serif;
6 | -webkit-font-smoothing: antialiased;
7 | -moz-osx-font-smoothing: grayscale;
8 | }
9 |
10 | code {
11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
12 | monospace;
13 | }
14 |
--------------------------------------------------------------------------------
/angular/angular/src/main.ts:
--------------------------------------------------------------------------------
1 | import { enableProdMode } from '@angular/core';
2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
3 |
4 | import { AppModule } from './app/app.module';
5 | import { environment } from './environments/environment';
6 |
7 | if (environment.production) {
8 | enableProdMode();
9 | }
10 |
11 | platformBrowserDynamic().bootstrapModule(AppModule)
12 | .catch(err => console.error(err));
13 |
--------------------------------------------------------------------------------
/react-java-mysql/frontend/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/react-nginx/src/reportWebVitals.js:
--------------------------------------------------------------------------------
1 | const reportWebVitals = onPerfEntry => {
2 | if (onPerfEntry && onPerfEntry instanceof Function) {
3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
4 | getCLS(onPerfEntry);
5 | getFID(onPerfEntry);
6 | getFCP(onPerfEntry);
7 | getLCP(onPerfEntry);
8 | getTTFB(onPerfEntry);
9 | });
10 | }
11 | };
12 |
13 | export default reportWebVitals;
14 |
--------------------------------------------------------------------------------
/flask-redis/compose.yaml:
--------------------------------------------------------------------------------
1 | services:
2 | redis:
3 | image: redislabs/redismod
4 | ports:
5 | - '6379:6379'
6 | web:
7 | build:
8 | context: .
9 | target: builder
10 | # flask requires SIGINT to stop gracefully
11 | # (default stop signal from Compose is SIGTERM)
12 | stop_signal: SIGINT
13 | ports:
14 | - '8000:8000'
15 | volumes:
16 | - .:/code
17 | depends_on:
18 | - redis
19 |
--------------------------------------------------------------------------------
/react-express-mysql/frontend/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/react-rust-postgres/frontend/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/wasmedge-mysql-nginx/backend/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "order_demo_service"
3 | version = "0.1.0"
4 | edition = "2021"
5 |
6 | [dependencies]
7 | anyhow = "1.0"
8 | serde_json = "1.0"
9 | serde = { version = "1.0", features = ["derive"] }
10 | url = "2.3"
11 | mysql_async_wasi = "0.30"
12 | hyper_wasi = { version = "0.15", features = ["full"] }
13 | tokio_wasi = { version = "1", features = ["io-util", "fs", "net", "time", "rt", "macros"] }
14 |
--------------------------------------------------------------------------------
/react-express-mongodb/frontend/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 | .idea
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/react-java-mysql/frontend/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
5 | sans-serif;
6 | -webkit-font-smoothing: antialiased;
7 | -moz-osx-font-smoothing: grayscale;
8 | }
9 |
10 | code {
11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
12 | monospace;
13 | }
14 |
--------------------------------------------------------------------------------
/react-express-mongodb/frontend/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
4 | "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
5 | sans-serif;
6 | -webkit-font-smoothing: antialiased;
7 | -moz-osx-font-smoothing: grayscale;
8 | }
9 |
10 | code {
11 | font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
12 | monospace;
13 | }
14 |
--------------------------------------------------------------------------------
/react-express-mysql/frontend/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
5 | sans-serif;
6 | -webkit-font-smoothing: antialiased;
7 | -moz-osx-font-smoothing: grayscale;
8 | }
9 |
10 | code {
11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
12 | monospace;
13 | }
14 |
--------------------------------------------------------------------------------
/react-rust-postgres/frontend/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
5 | sans-serif;
6 | -webkit-font-smoothing: antialiased;
7 | -moz-osx-font-smoothing: grayscale;
8 | }
9 |
10 | code {
11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
12 | monospace;
13 | }
14 |
--------------------------------------------------------------------------------
/django/app/example/wsgi.py:
--------------------------------------------------------------------------------
1 | """
2 | WSGI config for example project.
3 |
4 | It exposes the WSGI callable as a module-level variable named ``application``.
5 |
6 | For more information on this file, see
7 | https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/
8 | """
9 |
10 | import os
11 |
12 | from django.core.wsgi import get_wsgi_application
13 |
14 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "example.settings")
15 |
16 | application = get_wsgi_application()
17 |
--------------------------------------------------------------------------------
/nginx-golang/.docker/docker-compose.yaml:
--------------------------------------------------------------------------------
1 | services:
2 | proxy:
3 | image: nginx
4 | volumes:
5 | - type: bind
6 | source: ./proxy/nginx.conf
7 | target: /etc/nginx/conf.d/default.conf
8 | read_only: true
9 | ports:
10 | - 80:80
11 | depends_on:
12 | - backend
13 |
14 | backend:
15 | build:
16 | context: backend
17 | target: dev-envs
18 | volumes:
19 | - /var/run/docker.sock:/var/run/docker.sock
20 |
--------------------------------------------------------------------------------
/react-express-mongodb/frontend/src/App.scss:
--------------------------------------------------------------------------------
1 | .App {
2 | text-align: center;
3 | }
4 | .todo-app {
5 | background-color: #efefef;
6 | padding: 1.2em;
7 | .new-todo{
8 | display: flex;
9 | justify-content: space-between;
10 | align-items: center;
11 | input{
12 | width: 80% !important;
13 | }
14 | }
15 | }
16 |
17 | //.list-group-item{
18 | // &.active:hover{
19 | //
20 | // }
21 | // &active:hover{
22 | // background-color: #d3d3d3;
23 | // }
24 | //}
--------------------------------------------------------------------------------
/aspnet-mssql/app/aspnetapp/Dockerfile:
--------------------------------------------------------------------------------
1 |
2 | FROM mcr.microsoft.com/dotnet/aspnet:5.0 as base
3 | WORKDIR /app
4 |
5 | FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
6 | COPY . /src
7 | WORKDIR /src
8 | RUN ls
9 | RUN dotnet build "aspnetapp.csproj" -c Release -o /app/build
10 |
11 | FROM build AS publish
12 | RUN dotnet publish "aspnetapp.csproj" -c Release -o /app/publish
13 |
14 | FROM base AS final
15 | WORKDIR /app
16 | COPY --from=publish /app/publish .
17 | ENTRYPOINT ["dotnet", "aspnetapp.dll"]
--------------------------------------------------------------------------------
/angular/angular/src/app/app.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { BrowserModule } from '@angular/platform-browser';
3 |
4 | import { AppRoutingModule } from './app-routing.module';
5 | import { AppComponent } from './app.component';
6 |
7 | @NgModule({
8 | declarations: [
9 | AppComponent
10 | ],
11 | imports: [
12 | BrowserModule,
13 | AppRoutingModule
14 | ],
15 | providers: [],
16 | bootstrap: [AppComponent]
17 | })
18 | export class AppModule { }
19 |
--------------------------------------------------------------------------------
/nginx-nodejs-redis/compose.yaml:
--------------------------------------------------------------------------------
1 |
2 | services:
3 | redis:
4 | image: 'redislabs/redismod'
5 | ports:
6 | - '6379:6379'
7 | web1:
8 | restart: on-failure
9 | build: ./web
10 | hostname: web1
11 | ports:
12 | - '81:5000'
13 | web2:
14 | restart: on-failure
15 | build: ./web
16 | hostname: web2
17 | ports:
18 | - '82:5000'
19 | nginx:
20 | build: ./nginx
21 | ports:
22 | - '80:80'
23 | depends_on:
24 | - web1
25 | - web2
26 |
27 |
28 |
--------------------------------------------------------------------------------
/prometheus-grafana/prometheus/prometheus.yml:
--------------------------------------------------------------------------------
1 | global:
2 | scrape_interval: 15s
3 | scrape_timeout: 10s
4 | evaluation_interval: 15s
5 | alerting:
6 | alertmanagers:
7 | - static_configs:
8 | - targets: []
9 | scheme: http
10 | timeout: 10s
11 | api_version: v1
12 | scrape_configs:
13 | - job_name: prometheus
14 | honor_timestamps: true
15 | scrape_interval: 15s
16 | scrape_timeout: 10s
17 | metrics_path: /metrics
18 | scheme: http
19 | static_configs:
20 | - targets:
21 | - localhost:9090
--------------------------------------------------------------------------------
/react-rust-postgres/backend/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "react-rust-postgres"
3 | version = "0.1.0"
4 | authors = ["Jérémie Drouet "]
5 | edition = "2018"
6 |
7 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
8 |
9 | [dependencies]
10 | actix-web = "4.0.0-beta.8"
11 | deadpool-postgres = "0.9.0"
12 | env_logger = "^0.8"
13 | log = "^0.4"
14 | serde = "1.0"
15 | serde_json = "1.0"
16 | tokio-postgres = "^0.7"
17 | tokio-postgres-migration = "^0.1"
18 |
--------------------------------------------------------------------------------
/apache-php/app/Dockerfile:
--------------------------------------------------------------------------------
1 | # syntax=docker/dockerfile:1.4
2 |
3 | FROM --platform=$BUILDPLATFORM php:8.0.9-apache as builder
4 |
5 | CMD ["apache2-foreground"]
6 |
7 | FROM builder as dev-envs
8 |
9 | RUN <@ViewData["Title"]
5 | @ViewData["Message"]
6 |
7 |
8 | One Microsoft Way
9 | Redmond, WA 98052-6399
10 | P:
11 | 425.555.0100
12 |
13 |
14 |
15 | Support: Support@example.com
16 | Marketing: Marketing@example.com
17 |
18 |
--------------------------------------------------------------------------------
/nginx-flask-mongo/flask/server.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | import os
3 |
4 | from flask import Flask
5 | from pymongo import MongoClient
6 |
7 | app = Flask(__name__)
8 |
9 | client = MongoClient("mongo:27017")
10 |
11 | @app.route('/')
12 | def todo():
13 | try:
14 | client.admin.command('ismaster')
15 | except:
16 | return "Server not available"
17 | return "Hello from the MongoDB client!\n"
18 |
19 |
20 | if __name__ == "__main__":
21 | app.run(host='0.0.0.0', port=os.environ.get("FLASK_SERVER_PORT", 9090), debug=True)
22 |
23 |
--------------------------------------------------------------------------------
/wasmedge-kafka-mysql/etl/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "kafka"
3 | version = "0.1.0"
4 | edition = "2021"
5 |
6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7 |
8 | [dependencies]
9 | anyhow = "1.0.65"
10 | mega_etl = {git = "https://github.com/second-state/MEGA.git"}
11 | tokio_wasi = {version = '1.21', features = ["rt", "macros"]}
12 | env_logger = "0.9"
13 | log = "0.4"
14 | serde = { version = "1.0", features = ["derive"] }
15 | serde_json = "1.0"
16 | http_req_wasi = "0.10"
17 | lazy_static = "1.4.0"
18 |
--------------------------------------------------------------------------------
/react-express-mongodb/frontend/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import './index.css';
4 | import App from './App';
5 | import * as serviceWorker from './serviceWorker';
6 |
7 | import './custom.scss';
8 |
9 | ReactDOM.render( , document.getElementById('root'));
10 |
11 | // If you want your app to work offline and load faster, you can change
12 | // unregister() to register() below. Note this comes with some pitfalls.
13 | // Learn more about service workers: https://bit.ly/CRA-PWA
14 | serviceWorker.unregister();
15 |
--------------------------------------------------------------------------------
/react-java-mysql/backend/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL8Dialect
2 | spring.jpa.hibernate.ddl-auto=none
3 | spring.jpa.hibernate.show-sql=true
4 |
5 |
6 | spring.datasource.url=jdbc:mysql://${MYSQL_HOST:db}:3306/example
7 | spring.datasource.username=root
8 | spring.datasource.password=${MYSQL_PASSWORD:db-57xsl}
9 | spring.datasource.initialization-mode=always
10 | spring.datasource.initialize=true
11 | spring.datasource.schema=classpath:/schema.sql
12 | spring.datasource.continue-on-error=true
13 |
--------------------------------------------------------------------------------
/spring-postgres/backend/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect
2 | spring.jpa.hibernate.ddl-auto=none
3 | spring.jpa.hibernate.show-sql=true
4 |
5 | spring.datasource.url=jdbc:postgresql://db:5432/${POSTGRES_DB}
6 | spring.datasource.username=postgres
7 | spring.datasource.password=${POSTGRES_PASSWORD:db-wrz2z}
8 | spring.datasource.initialization-mode=always
9 | spring.datasource.initialize=true
10 | spring.datasource.schema=classpath:/schema.sql
11 | spring.datasource.continue-on-error=true
12 |
--------------------------------------------------------------------------------
/aspnet-mssql/app/aspnetapp/wwwroot/lib/bootstrap/dist/js/npm.js:
--------------------------------------------------------------------------------
1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.
2 | require('../../js/transition.js')
3 | require('../../js/alert.js')
4 | require('../../js/button.js')
5 | require('../../js/carousel.js')
6 | require('../../js/collapse.js')
7 | require('../../js/dropdown.js')
8 | require('../../js/modal.js')
9 | require('../../js/tooltip.js')
10 | require('../../js/popover.js')
11 | require('../../js/scrollspy.js')
12 | require('../../js/tab.js')
13 | require('../../js/affix.js')
--------------------------------------------------------------------------------
/aspnet-mssql/app/aspnetapp/wwwroot/lib/jquery-validation-unobtrusive/.bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "jquery-validation-unobtrusive",
3 | "homepage": "https://github.com/aspnet/jquery-validation-unobtrusive",
4 | "version": "3.2.9",
5 | "_release": "3.2.9",
6 | "_resolution": {
7 | "type": "version",
8 | "tag": "v3.2.9",
9 | "commit": "a91f5401898e125f10771c5f5f0909d8c4c82396"
10 | },
11 | "_source": "https://github.com/aspnet/jquery-validation-unobtrusive.git",
12 | "_target": "^3.2.9",
13 | "_originalSource": "jquery-validation-unobtrusive",
14 | "_direct": true
15 | }
--------------------------------------------------------------------------------
/react-nginx/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import './index.css';
4 | import App from './App';
5 | import reportWebVitals from './reportWebVitals';
6 |
7 | ReactDOM.render(
8 |
9 |
10 | ,
11 | document.getElementById('root')
12 | );
13 |
14 | // If you want to start measuring performance in your app, pass a function
15 | // to log results (for example: reportWebVitals(console.log))
16 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
17 | reportWebVitals();
18 |
--------------------------------------------------------------------------------
/react-express-mysql/backend/healthcheck.js:
--------------------------------------------------------------------------------
1 | const http = require("http");
2 |
3 | const options = {
4 | timeout: 2000,
5 | host: "localhost",
6 | port: process.env.PORT || 8080,
7 | path: "/healthz" // must be the same as HEALTHCHECK in Dockerfile
8 | };
9 |
10 | const request = http.request(options, res => {
11 | console.info("STATUS: " + res.statusCode);
12 | process.exitCode = res.statusCode === 200 ? 0 : 1;
13 | process.exit();
14 | });
15 |
16 | request.on("error", function(err) {
17 | console.error("ERROR", err);
18 | process.exit(1);
19 | });
20 |
21 | request.end();
22 |
--------------------------------------------------------------------------------
/elasticsearch-logstash-kibana/logstash/pipeline/logstash-nginx.config:
--------------------------------------------------------------------------------
1 | input {
2 | file {
3 | path => "/home/nginx.log"
4 | start_position => "beginning"
5 | sincedb_path => "/dev/null"
6 | }
7 | }
8 |
9 | filter {
10 | json {
11 | source => "message"
12 | }
13 | geoip {
14 | source => "remote_ip"
15 | }
16 | useragent {
17 | source => "agent"
18 | target => "useragent"
19 | }
20 | }
21 |
22 | output {
23 | elasticsearch {
24 | hosts => ["http://es:9200"]
25 | index => "nginx"
26 | }
27 | stdout {
28 | codec => rubydebug
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/react-java-mysql/frontend/src/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import './index.css';
4 | import App from './App';
5 | import * as serviceWorker from './serviceWorker';
6 |
7 | ReactDOM.render(
8 |
9 |
10 | ,
11 | document.getElementById('root')
12 | );
13 |
14 | // If you want your app to work offline and load faster, you can change
15 | // unregister() to register() below. Note this comes with some pitfalls.
16 | // Learn more about service workers: https://bit.ly/CRA-PWA
17 | serviceWorker.unregister();
18 |
--------------------------------------------------------------------------------
/react-express-mysql/frontend/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import './index.css';
4 | import App from './App';
5 | import * as serviceWorker from './serviceWorker';
6 |
7 | ReactDOM.render(
8 |
9 |
10 | ,
11 | document.getElementById('root')
12 | );
13 |
14 | // If you want your app to work offline and load faster, you can change
15 | // unregister() to register() below. Note this comes with some pitfalls.
16 | // Learn more about service workers: https://bit.ly/CRA-PWA
17 | serviceWorker.unregister();
18 |
--------------------------------------------------------------------------------
/react-rust-postgres/frontend/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import './index.css';
4 | import App from './App';
5 | import * as serviceWorker from './serviceWorker';
6 |
7 | ReactDOM.render(
8 |
9 |
10 | ,
11 | document.getElementById('root')
12 | );
13 |
14 | // If you want your app to work offline and load faster, you can change
15 | // unregister() to register() below. Note this comes with some pitfalls.
16 | // Learn more about service workers: https://bit.ly/CRA-PWA
17 | serviceWorker.unregister();
18 |
--------------------------------------------------------------------------------
/traefik-golang/backend/main.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 | "net/http"
7 | )
8 |
9 | func handler(w http.ResponseWriter, r *http.Request) {
10 | fmt.Println(r.URL.RawQuery)
11 | fmt.Fprintf(w, `
12 | ## .
13 | ## ## ## ==
14 | ## ## ## ## ## ===
15 | /"""""""""""""""""\___/ ===
16 | { / ===-
17 | \______ O __/
18 | \ \ __/
19 | \____\_______/
20 |
21 |
22 | Hello from Docker!
23 |
24 | `)
25 | }
26 |
27 | func main() {
28 | http.HandleFunc("/", handler)
29 | log.Fatal(http.ListenAndServe(":80", nil))
30 | }
31 |
--------------------------------------------------------------------------------
/react-nginx/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/traefik-golang/compose.yaml:
--------------------------------------------------------------------------------
1 | services:
2 | frontend:
3 | image: traefik:2.6
4 | command: --providers.docker --entrypoints.web.address=:80 --providers.docker.exposedbydefault=false
5 | ports:
6 | # The HTTP port
7 | - "80:80"
8 | volumes:
9 | # So that Traefik can listen to the Docker events
10 | - /var/run/docker.sock:/var/run/docker.sock
11 | depends_on:
12 | - backend
13 | backend:
14 | build: backend
15 | labels:
16 | - "traefik.enable=true"
17 | - "traefik.http.routers.go.rule=Path(`/`)"
18 | - "traefik.http.services.go.loadbalancer.server.port=80"
19 |
--------------------------------------------------------------------------------
/react-java-mysql/frontend/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es5",
4 | "lib": [
5 | "dom",
6 | "dom.iterable",
7 | "esnext"
8 | ],
9 | "allowJs": true,
10 | "skipLibCheck": true,
11 | "esModuleInterop": true,
12 | "allowSyntheticDefaultImports": true,
13 | "strict": true,
14 | "forceConsistentCasingInFileNames": true,
15 | "module": "esnext",
16 | "moduleResolution": "node",
17 | "resolveJsonModule": true,
18 | "isolatedModules": true,
19 | "noEmit": true,
20 | "jsx": "react"
21 | },
22 | "include": [
23 | "src"
24 | ]
25 | }
26 |
--------------------------------------------------------------------------------
/flask/app/Dockerfile:
--------------------------------------------------------------------------------
1 | # syntax=docker/dockerfile:1.4
2 | FROM --platform=$BUILDPLATFORM python:3.10-alpine AS builder
3 |
4 | WORKDIR /app
5 |
6 | COPY requirements.txt /app
7 | RUN --mount=type=cache,target=/root/.cache/pip \
8 | pip3 install -r requirements.txt
9 |
10 | COPY . /app
11 |
12 | ENTRYPOINT ["python3"]
13 | CMD ["app.py"]
14 |
15 | FROM builder as dev-envs
16 |
17 | RUN <
16 | Host.CreateDefaultBuilder(args)
17 | .ConfigureWebHostDefaults(webBuilder =>
18 | {
19 | webBuilder.UseStartup();
20 | });
21 | }
--------------------------------------------------------------------------------
/fastapi/Dockerfile:
--------------------------------------------------------------------------------
1 | # syntax = docker/dockerfile:1.4
2 |
3 | FROM tiangolo/uvicorn-gunicorn-fastapi:python3.9-slim AS builder
4 |
5 | WORKDIR /app
6 |
7 | COPY requirements.txt ./
8 | RUN --mount=type=cache,target=/root/.cache/pip \
9 | pip install -r requirements.txt
10 |
11 | COPY ./app ./app
12 |
13 | FROM builder as dev-envs
14 |
15 | RUN <
2 |
3 |
4 |
5 |
6 |
7 |
8 |
18 |
19 |
29 |
--------------------------------------------------------------------------------
/wasmedge-mysql-nginx/compose.yml:
--------------------------------------------------------------------------------
1 | services:
2 | frontend:
3 | image: nginx:alpine
4 | ports:
5 | - 8090:80
6 | volumes:
7 | - ./frontend:/usr/share/nginx/html
8 |
9 | backend:
10 | image: demo-microservice
11 | platform: wasi/wasm
12 | build:
13 | context: backend/
14 | ports:
15 | - 8080:8080
16 | environment:
17 | DATABASE_URL: mysql://root:whalehello@db:3306/mysql
18 | RUST_BACKTRACE: full
19 | restart: unless-stopped
20 | runtime: io.containerd.wasmedge.v1
21 |
22 | db:
23 | image: mariadb:10.9
24 | environment:
25 | MYSQL_ROOT_PASSWORD: whalehello
26 |
--------------------------------------------------------------------------------
/react-nginx/src/App.js:
--------------------------------------------------------------------------------
1 | import logo from './logo.svg';
2 | import './App.css';
3 |
4 | function App() {
5 | return (
6 |
22 | );
23 | }
24 |
25 | export default App;
26 |
--------------------------------------------------------------------------------
/spring-postgres/backend/src/main/java/com/company/project/Application.java:
--------------------------------------------------------------------------------
1 | package com.company.project;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
5 | import org.springframework.boot.autoconfigure.SpringBootApplication;
6 | import org.springframework.context.annotation.ComponentScan;
7 |
8 | @SpringBootApplication
9 | @EnableAutoConfiguration
10 | @ComponentScan(basePackages = {"com.company.project"})
11 | public class Application {
12 |
13 | public static void main(String[] args) {
14 | SpringApplication.run(Application.class, args);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/react-java-mysql/backend/src/main/java/com/company/project/Application.java:
--------------------------------------------------------------------------------
1 | package com.company.project;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
5 | import org.springframework.boot.autoconfigure.SpringBootApplication;
6 | import org.springframework.context.annotation.ComponentScan;
7 |
8 | @SpringBootApplication
9 | @EnableAutoConfiguration
10 | @ComponentScan(basePackages = {"com.company.project"})
11 | public class Application {
12 |
13 | public static void main(String[] args) {
14 | SpringApplication.run(Application.class, args);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/wasmedge-mysql-nginx/.docker/docker-compose.yml:
--------------------------------------------------------------------------------
1 | services:
2 | frontend:
3 | image: nginx:alpine
4 | ports:
5 | - 8090:80
6 | volumes:
7 | - ./frontend:/usr/share/nginx/html
8 |
9 | backend:
10 | image: demo-microservice
11 | platform: wasi/wasm
12 | build:
13 | context: backend/
14 | ports:
15 | - 8080:8080
16 | environment:
17 | DATABASE_URL: mysql://root:whalehello@db:3306/mysql
18 | RUST_BACKTRACE: full
19 | restart: unless-stopped
20 | runtime: io.containerd.wasmedge.v1
21 |
22 | db:
23 | image: mariadb:10.9
24 | environment:
25 | MYSQL_ROOT_PASSWORD: whalehello
26 |
--------------------------------------------------------------------------------
/nginx-wsgi-flask/flask/app.py:
--------------------------------------------------------------------------------
1 | from flask import Flask, request, jsonify
2 |
3 | app = Flask(__name__)
4 |
5 | @app.route('/')
6 | def hello():
7 | return "Hello World!"
8 |
9 | @app.route('/cache-me')
10 | def cache():
11 | return "nginx will cache this response"
12 |
13 | @app.route('/info')
14 | def info():
15 |
16 | resp = {
17 | 'connecting_ip': request.headers['X-Real-IP'],
18 | 'proxy_ip': request.headers['X-Forwarded-For'],
19 | 'host': request.headers['Host'],
20 | 'user-agent': request.headers['User-Agent']
21 | }
22 |
23 | return jsonify(resp)
24 |
25 | @app.route('/flask-health-check')
26 | def flask_health_check():
27 | return "success"
28 |
--------------------------------------------------------------------------------
/postgresql-pgadmin/compose.yaml:
--------------------------------------------------------------------------------
1 | services:
2 | postgres:
3 | container_name: postgres
4 | image: postgres:latest
5 | environment:
6 | - POSTGRES_USER=${POSTGRES_USER}
7 | - POSTGRES_PASSWORD=${POSTGRES_PW}
8 | - POSTGRES_DB=${POSTGRES_DB} #optional (specify default database instead of $POSTGRES_DB)
9 | ports:
10 | - "5432:5432"
11 | restart: always
12 |
13 | pgadmin:
14 | container_name: pgadmin
15 | image: dpage/pgadmin4:latest
16 | environment:
17 | - PGADMIN_DEFAULT_EMAIL=${PGADMIN_MAIL}
18 | - PGADMIN_DEFAULT_PASSWORD=${PGADMIN_PW}
19 | ports:
20 | - "5050:80"
21 | restart: always
22 |
--------------------------------------------------------------------------------
/nginx-flask-mongo/flask/Dockerfile:
--------------------------------------------------------------------------------
1 | # syntax=docker/dockerfile:1.4
2 | FROM --platform=$BUILDPLATFORM python:3.10-alpine AS builder
3 |
4 | WORKDIR /src
5 | COPY requirements.txt /src
6 | RUN --mount=type=cache,target=/root/.cache/pip \
7 | pip3 install -r requirements.txt
8 |
9 | COPY . .
10 |
11 | CMD ["python3", "server.py"]
12 |
13 | FROM builder as dev-envs
14 |
15 | RUN <
2 |
3 |
4 |
5 |
6 |
7 |
8 | <%= htmlWebpackPlugin.options.title %>
9 |
10 |
11 |
12 | We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/gitea-postgres/compose.yaml:
--------------------------------------------------------------------------------
1 | services:
2 | gitea:
3 | image: gitea/gitea:latest
4 | environment:
5 | - DB_TYPE=postgres
6 | - DB_HOST=db:5432
7 | - DB_NAME=gitea
8 | - DB_USER=gitea
9 | - DB_PASSWD=gitea
10 | restart: always
11 | volumes:
12 | - git_data:/data
13 | ports:
14 | - 3000:3000
15 | db:
16 | image: postgres:alpine
17 | environment:
18 | - POSTGRES_USER=gitea
19 | - POSTGRES_PASSWORD=gitea
20 | - POSTGRES_DB=gitea
21 | restart: always
22 | volumes:
23 | - db_data:/var/lib/postgresql/data
24 | expose:
25 | - 5432
26 | volumes:
27 | db_data:
28 | git_data:
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/nginx-golang-postgres/backend/go.sum:
--------------------------------------------------------------------------------
1 | github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8=
2 | github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
3 | github.com/gorilla/handlers v1.3.0 h1:tsg9qP3mjt1h4Roxp+M1paRjrVBfPSOpBuVclh6YluI=
4 | github.com/gorilla/handlers v1.3.0/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ=
5 | github.com/gorilla/mux v1.6.2 h1:Pgr17XVTNXAk3q/r4CpKzC5xBM/qW1uVLV+IhRZpIIk=
6 | github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
7 | github.com/lib/pq v1.10.3 h1:v9QZf2Sn6AmjXtQeFpdoq/eaNtYP6IN+7lcrygsIAtg=
8 | github.com/lib/pq v1.10.3/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
9 |
--------------------------------------------------------------------------------
/react-rust-postgres/backend/src/user.rs:
--------------------------------------------------------------------------------
1 | use tokio_postgres::{Error, GenericClient, Row};
2 |
3 | #[derive(Debug, serde::Serialize)]
4 | pub struct User {
5 | pub id: i32,
6 | pub login: String,
7 | }
8 |
9 | impl From for User {
10 | fn from(row: Row) -> Self {
11 | Self {
12 | id: row.get(0),
13 | login: row.get(1),
14 | }
15 | }
16 | }
17 |
18 | impl User {
19 | pub async fn all(client: &C) -> Result, Error> {
20 | let stmt = client.prepare("SELECT id, login FROM users").await?;
21 | let rows = client.query(&stmt, &[]).await?;
22 |
23 | Ok(rows.into_iter().map(User::from).collect())
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/nginx-golang-mysql/backend/go.sum:
--------------------------------------------------------------------------------
1 | github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ=
2 | github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
3 | github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE=
4 | github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
5 | github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4=
6 | github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q=
7 | github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=
8 | github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
9 |
--------------------------------------------------------------------------------
/prometheus-grafana/compose.yaml:
--------------------------------------------------------------------------------
1 | services:
2 | prometheus:
3 | image: prom/prometheus
4 | container_name: prometheus
5 | command:
6 | - '--config.file=/etc/prometheus/prometheus.yml'
7 | ports:
8 | - 9090:9090
9 | restart: unless-stopped
10 | volumes:
11 | - ./prometheus:/etc/prometheus
12 | - prom_data:/prometheus
13 | grafana:
14 | image: grafana/grafana
15 | container_name: grafana
16 | ports:
17 | - 3000:3000
18 | restart: unless-stopped
19 | environment:
20 | - GF_SECURITY_ADMIN_USER=admin
21 | - GF_SECURITY_ADMIN_PASSWORD=grafana
22 | volumes:
23 | - ./grafana:/etc/grafana/provisioning/datasources
24 | volumes:
25 | prom_data:
26 |
--------------------------------------------------------------------------------
/.github/workflows/codeql-analysis.yml:
--------------------------------------------------------------------------------
1 | name: "CodeQL"
2 |
3 | on:
4 | push:
5 | branches: [ master ]
6 |
7 | jobs:
8 | analyze:
9 | name: Analyze
10 | runs-on: ubuntu-latest
11 |
12 | strategy:
13 | fail-fast: false
14 | matrix:
15 | language: [ 'go', 'typescript', 'python' ]
16 |
17 | steps:
18 | - name: Checkout repository
19 | uses: actions/checkout@v2
20 |
21 | - name: Initialize CodeQL
22 | uses: github/codeql-action/init@v1
23 | with:
24 | languages: ${{ matrix.language }}
25 |
26 | - name: Autobuild
27 | uses: github/codeql-action/autobuild@v1
28 |
29 | - name: Perform CodeQL Analysis
30 | uses: github/codeql-action/analyze@v1
31 |
--------------------------------------------------------------------------------
/nginx-flask-mongo/.docker/docker-compose.yaml:
--------------------------------------------------------------------------------
1 | services:
2 | web:
3 | image: nginx
4 | volumes:
5 | - ./nginx/nginx.conf:/tmp/nginx.conf
6 | environment:
7 | - FLASK_SERVER_ADDR=backend:9091
8 | command: /bin/bash -c "envsubst < /tmp/nginx.conf > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
9 | ports:
10 | - 80:80
11 | depends_on:
12 | - backend
13 |
14 | backend:
15 | build:
16 | context: flask
17 | target: dev-envs
18 | stop_signal: SIGINT
19 | environment:
20 | - FLASK_SERVER_PORT=9091
21 | volumes:
22 | - /var/run/docker.sock:/var/run/docker.sock
23 | depends_on:
24 | - mongo
25 |
26 | mongo:
27 | image: mongo
28 |
--------------------------------------------------------------------------------
/angular/angular/Dockerfile:
--------------------------------------------------------------------------------
1 | # syntax=docker/dockerfile:1.4
2 |
3 | FROM --platform=$BUILDPLATFORM node:17.0.1-bullseye-slim as builder
4 |
5 | RUN mkdir /project
6 | WORKDIR /project
7 |
8 | RUN npm install -g @angular/cli@13
9 |
10 | COPY package.json package-lock.json ./
11 | RUN npm ci
12 |
13 | COPY . .
14 | CMD ["ng", "serve", "--host", "0.0.0.0"]
15 |
16 | FROM builder as dev-envs
17 |
18 | RUN < /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
9 | ports:
10 | - 80:80
11 | depends_on:
12 | - backend
13 |
14 | backend:
15 | build:
16 | context: flask
17 | target: builder
18 | # flask requires SIGINT to stop gracefully
19 | # (default stop signal from Compose is SIGTERM)
20 | stop_signal: SIGINT
21 | environment:
22 | - FLASK_SERVER_PORT=9091
23 | volumes:
24 | - ./flask:/src
25 | depends_on:
26 | - mongo
27 |
28 | mongo:
29 | image: mongo
30 |
--------------------------------------------------------------------------------
/react-java-mysql/backend/src/main/java/com/company/project/controllers/HomeController.java:
--------------------------------------------------------------------------------
1 | package com.company.project.controllers;
2 |
3 | import com.company.project.entity.Greeting;
4 | import com.company.project.repository.GreetingRepository;
5 | import org.springframework.beans.factory.annotation.Autowired;
6 | import org.springframework.ui.Model;
7 | import org.springframework.web.bind.annotation.GetMapping;
8 | import org.springframework.web.bind.annotation.RestController;
9 |
10 | @RestController
11 | public class HomeController {
12 |
13 | @Autowired
14 | private GreetingRepository repository;
15 |
16 | @GetMapping("/")
17 | public Greeting showHome(String name, Model model) {
18 | return repository.findById(1).orElse(new Greeting("Not Found 😕"));
19 | }
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/nginx-flask-mysql/backend/Dockerfile:
--------------------------------------------------------------------------------
1 | # syntax=docker/dockerfile:1.4
2 | FROM --platform=$BUILDPLATFORM python:3.10-alpine AS builder
3 |
4 | WORKDIR /code
5 | COPY requirements.txt /code
6 | RUN --mount=type=cache,target=/root/.cache/pip \
7 | pip3 install -r requirements.txt
8 |
9 | COPY . .
10 |
11 | ENV FLASK_APP hello.py
12 | ENV FLASK_ENV development
13 | ENV FLASK_RUN_PORT 8000
14 | ENV FLASK_RUN_HOST 0.0.0.0
15 |
16 | EXPOSE 8000
17 |
18 | CMD ["flask", "run"]
19 |
20 | FROM builder AS dev-envs
21 |
22 | RUN <
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/react-express-mysql/backend/src/config.js:
--------------------------------------------------------------------------------
1 | const fs = require("fs");
2 |
3 | const readFileSync = filename => fs.readFileSync(filename).toString("utf8");
4 |
5 | // Constants
6 | module.exports = {
7 | database: {
8 | host: process.env.DATABASE_HOST || "localhost",
9 | port: process.env.DATABASE_PORT,
10 | database: process.env.DATABASE_DB,
11 | user: process.env.DATABASE_USER,
12 | password: process.env.DATABASE_PASSWORD
13 | ? readFileSync(process.env.DATABASE_PASSWORD)
14 | : null
15 | },
16 | port: process.env.PORT || 8080
17 | // if you're not using docker compose for local development, this will default to 8080
18 | // to prevent non-root permission problems with 80. Dockerfile is set to make this 80
19 | // because containers don't have that issue :)
20 | };
21 |
--------------------------------------------------------------------------------
/nginx-nodejs-redis/web/server.js:
--------------------------------------------------------------------------------
1 | const os = require('os');
2 | const express = require('express');
3 | const app = express();
4 | const redis = require('redis');
5 | const redisClient = redis.createClient({
6 | host: 'redis',
7 | port: 6379
8 | });
9 |
10 | app.get('/', function(req, res) {
11 | redisClient.get('numVisits', function(err, numVisits) {
12 | numVisitsToDisplay = parseInt(numVisits) + 1;
13 | if (isNaN(numVisitsToDisplay)) {
14 | numVisitsToDisplay = 1;
15 | }
16 | res.send(os.hostname() +': Number of visits is: ' + numVisitsToDisplay);
17 | numVisits++;
18 | redisClient.set('numVisits', numVisits);
19 | });
20 | });
21 |
22 | app.listen(5000, function() {
23 | console.log('Web application is listening on port 5000');
24 | });
25 |
--------------------------------------------------------------------------------
/react-express-mongodb/backend/utils/helpers/responses.js:
--------------------------------------------------------------------------------
1 | const serverResponse = {
2 | sendSuccess: (res, message, data = null) => {
3 | const responseMessage = {
4 | code: message.code ? message.code : 500,
5 | success: message.success,
6 | message: message.message,
7 | };
8 | if (data) { responseMessage.data = data; }
9 | return res.status(message.code).json(responseMessage);
10 | },
11 | sendError: (res, error) => {
12 | const responseMessage = {
13 | code: error.code ? error.code : 500,
14 | success: false,
15 | message: error.message,
16 | };
17 | return res.status(error.code ? error.code : 500).json(responseMessage);
18 | },
19 | };
20 |
21 | module.exports = serverResponse;
--------------------------------------------------------------------------------
/spring-postgres/.docker/docker-compose.yaml:
--------------------------------------------------------------------------------
1 | services:
2 | backend:
3 | build:
4 | context: backend
5 | target: dev-envs
6 | ports:
7 | - 8080:8080
8 | environment:
9 | - POSTGRES_DB=example
10 | networks:
11 | - spring-postgres
12 | volumes:
13 | - /var/run/docker.sock:/var/run/docker.sock
14 | db:
15 | image: postgres
16 | restart: always
17 | secrets:
18 | - db-password
19 | volumes:
20 | - db-data:/var/lib/postgresql/data
21 | networks:
22 | - spring-postgres
23 | environment:
24 | - POSTGRES_DB=example
25 | - POSTGRES_PASSWORD_FILE=/run/secrets/db-password
26 | expose:
27 | - 5432
28 | volumes:
29 | db-data:
30 | secrets:
31 | db-password:
32 | file: db/password.txt
33 | networks:
34 | spring-postgres:
35 |
--------------------------------------------------------------------------------
/angular/angular/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # compiled output
4 | /dist
5 | /tmp
6 | /out-tsc
7 | # Only exists if Bazel was run
8 | /bazel-out
9 |
10 | # dependencies
11 | /node_modules
12 |
13 | # profiling files
14 | chrome-profiler-events*.json
15 |
16 | # IDEs and editors
17 | /.idea
18 | .project
19 | .classpath
20 | .c9/
21 | *.launch
22 | .settings/
23 | *.sublime-workspace
24 |
25 | # IDE - VSCode
26 | .vscode/*
27 | !.vscode/settings.json
28 | !.vscode/tasks.json
29 | !.vscode/launch.json
30 | !.vscode/extensions.json
31 | .history/*
32 |
33 | # misc
34 | /.angular/cache
35 | /.sass-cache
36 | /connect.lock
37 | /coverage
38 | /libpeerconnection.log
39 | npm-debug.log
40 | yarn-error.log
41 | testem.log
42 | /typings
43 |
44 | # System Files
45 | .DS_Store
46 | Thumbs.db
47 |
--------------------------------------------------------------------------------
/react-rust-postgres/frontend/Dockerfile:
--------------------------------------------------------------------------------
1 | # syntax=docker/dockerfile:1.4
2 | FROM node:lts AS development
3 |
4 | ENV CI=true
5 | ENV PORT=3000
6 |
7 | WORKDIR /code
8 | COPY package.json /code/package.json
9 | COPY package-lock.json /code/package-lock.json
10 | RUN npm ci
11 | COPY . /code
12 |
13 | CMD [ "npm", "start" ]
14 |
15 | FROM development as dev-envs
16 | RUN < {
10 | it("it should return 200", done => {
11 | chai
12 | .request(app)
13 | .get("/healthz")
14 | .end((err, res) => {
15 | res.should.have.status(200);
16 | done();
17 | });
18 | });
19 | });
20 |
21 | describe("API /", () => {
22 | it("it should return Welcome message", done => {
23 | chai
24 | .request(app)
25 | .get("/")
26 | .end((err, res) => {
27 | res.should.have.status(200);
28 | res.should.to.be.html;
29 | res.text.should.be.equal("Hello Docker World\n");
30 | done();
31 | });
32 | });
33 | });
34 |
--------------------------------------------------------------------------------
/django/app/example/urls.py:
--------------------------------------------------------------------------------
1 | """example URL Configuration
2 |
3 | The `urlpatterns` list routes URLs to views. For more information please see:
4 | https://docs.djangoproject.com/en/1.11/topics/http/urls/
5 | Examples:
6 | Function views
7 | 1. Add an import: from my_app import views
8 | 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
9 | Class-based views
10 | 1. Add an import: from other_app.views import Home
11 | 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home')
12 | Including another URLconf
13 | 1. Import the include() function: from django.conf.urls import url, include
14 | 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
15 | """
16 | from django.conf.urls import url
17 | from django.contrib import admin
18 |
19 | urlpatterns = [
20 | url(r'^admin/', admin.site.urls),
21 | ]
22 |
--------------------------------------------------------------------------------
/react-java-mysql/frontend/Dockerfile:
--------------------------------------------------------------------------------
1 | # syntax=docker/dockerfile:1.4
2 |
3 | FROM --platform=$BUILDPLATFORM node:lts AS development
4 |
5 | WORKDIR /code
6 | COPY package.json /code/package.json
7 | COPY package-lock.json /code/package-lock.json
8 |
9 | RUN npm ci
10 | COPY . /code
11 |
12 | ENV CI=true
13 | ENV PORT=3000
14 |
15 | CMD [ "npm", "start" ]
16 |
17 | FROM development AS dev-envs
18 | RUN <(id: string): T;
14 | };
15 | };
16 |
17 | // First, initialize the Angular testing environment.
18 | getTestBed().initTestEnvironment(
19 | BrowserDynamicTestingModule,
20 | platformBrowserDynamicTesting(),
21 | );
22 |
23 | // Then we find all the tests.
24 | const context = require.context('./', true, /\.spec\.ts$/);
25 | // And load the modules.
26 | context.keys().map(context);
27 |
--------------------------------------------------------------------------------
/react-express-mongodb/backend/server.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created by Syed Afzal
3 | */
4 | require("./config/config");
5 |
6 | const express = require("express");
7 | const path = require("path");
8 | const cookieParser = require("cookie-parser");
9 | const bodyParser = require("body-parser");
10 | const cors = require("cors");
11 | const db = require("./db");
12 |
13 | const app = express();
14 |
15 | //connection from db here
16 | db.connect(app);
17 |
18 | app.use(cors());
19 | app.use(bodyParser.json());
20 | app.use(bodyParser.urlencoded({ extended: false }));
21 | app.use(cookieParser());
22 | app.use(express.static(path.join(__dirname, "public")));
23 |
24 | // adding routes
25 | require("./routes")(app);
26 |
27 | app.on("ready", () => {
28 | app.listen(3000, () => {
29 | console.log("Server is up on port", 3000);
30 | });
31 | });
32 |
33 | module.exports = app;
34 |
--------------------------------------------------------------------------------
/nginx-wsgi-flask/compose.yaml:
--------------------------------------------------------------------------------
1 | services:
2 | nginx-proxy:
3 | build: nginx
4 | restart: always
5 | volumes:
6 | - ./nginx/default.conf:/tmp/default.conf
7 | environment:
8 | - FLASK_SERVER_ADDR=flask-app:8000
9 | ports:
10 | - "80:80"
11 | depends_on:
12 | - flask-app
13 | healthcheck:
14 | test: ["CMD-SHELL", "curl --silent --fail localhost:80/health-check || exit 1"]
15 | interval: 10s
16 | timeout: 10s
17 | retries: 3
18 | command: /app/start.sh
19 | flask-app:
20 | build: flask
21 | restart: always
22 | ports:
23 | - '8000:8000'
24 | healthcheck:
25 | test: ["CMD-SHELL", "curl --silent --fail localhost:8000/flask-health-check || exit 1"]
26 | interval: 10s
27 | timeout: 10s
28 | retries: 3
29 | command: gunicorn -w 3 -t 60 -b 0.0.0.0:8000 app:app
30 |
--------------------------------------------------------------------------------
/react-express-mongodb/frontend/src/components/AddTodo.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | export default class AddTodo extends React.Component {
4 | handleSubmit = (e) => {
5 | e.preventDefault();
6 | const { value } = e.target.elements.value;
7 | if (value.length > 0) {
8 | this.props.handleAddTodo(value);
9 | e.target.reset();
10 | }
11 | };
12 |
13 | render() {
14 | return (
15 |
31 | );
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/react-express-mongodb/backend/db/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created by Syed Afzal
3 | */
4 | const mongoose = require("mongoose");
5 |
6 | exports.connect = (app) => {
7 | const options = {
8 | useNewUrlParser: true,
9 | autoIndex: false, // Don't build indexes
10 | maxPoolSize: 10, // Maintain up to 10 socket connections
11 | };
12 |
13 | const connectWithRetry = () => {
14 | mongoose.Promise = global.Promise;
15 | console.log("MongoDB connection with retry");
16 | mongoose
17 | .connect(process.env.MONGODB_URI, options)
18 | .then(() => {
19 | console.log("MongoDB is connected");
20 | app.emit("ready");
21 | })
22 | .catch((err) => {
23 | console.log("MongoDB connection unsuccessful, retry after 2 seconds.", err);
24 | setTimeout(connectWithRetry, 2000);
25 | });
26 | };
27 | connectWithRetry();
28 | };
29 |
--------------------------------------------------------------------------------
/sparkjava-mysql/.docker/docker-compose.yaml:
--------------------------------------------------------------------------------
1 | services:
2 | backend:
3 | build:
4 | context: backend
5 | target: dev-envs
6 | ports:
7 | - 8080:8080
8 | secrets:
9 | - db-password
10 | volumes:
11 | - /var/run/docker.sock:/var/run/docker.sock
12 | db:
13 | # We use a mariadb image which supports both amd64 & arm64 architecture
14 | image: mariadb:10.6.4-focal
15 | # If you really want to use MySQL, uncomment the following line
16 | #image: mysql:8.0.27
17 | restart: always
18 | secrets:
19 | - db-password
20 | volumes:
21 | - db-data:/var/lib/mysql
22 | environment:
23 | - MYSQL_DATABASE=example
24 | - MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db-password
25 | expose:
26 | - 3306
27 | - 33060
28 | volumes:
29 | db-data:
30 | secrets:
31 | db-password:
32 | file: db/password.txt
33 |
--------------------------------------------------------------------------------
/sparkjava-mysql/backend/Dockerfile:
--------------------------------------------------------------------------------
1 | # syntax=docker/dockerfile:1.4
2 |
3 | FROM --platform=$BUILDPLATFORM maven:3.8.5-eclipse-temurin-17 AS build
4 | WORKDIR /workdir/server
5 | COPY pom.xml /workdir/server/pom.xml
6 | RUN mvn dependency:go-offline
7 |
8 | COPY src /workdir/server/src
9 |
10 | RUN mvn --batch-mode clean compile assembly:single
11 |
12 | FROM build AS dev-envs
13 | RUN <Error.
7 | An error occurred while processing your request.
8 |
9 | @if (Model.ShowRequestId)
10 | {
11 |
12 | Request ID: @Model.RequestId
13 |
14 | }
15 |
16 | Development Mode
17 |
18 | Swapping to Development environment will display more detailed information about the error that occurred.
19 |
20 |
21 | Development environment should not be enabled in deployed applications , as it can result in sensitive information from exceptions being displayed to end users. For local debugging, development environment can be enabled by setting the ASPNETCORE_ENVIRONMENT environment variable to Development , and restarting the application.
22 |
23 |
--------------------------------------------------------------------------------
/wordpress-mysql/compose.yaml:
--------------------------------------------------------------------------------
1 | services:
2 | db:
3 | # We use a mariadb image which supports both amd64 & arm64 architecture
4 | image: mariadb:10.6.4-focal
5 | # If you really want to use MySQL, uncomment the following line
6 | #image: mysql:8.0.27
7 | command: '--default-authentication-plugin=mysql_native_password'
8 | volumes:
9 | - db_data:/var/lib/mysql
10 | restart: always
11 | environment:
12 | - MYSQL_ROOT_PASSWORD=somewordpress
13 | - MYSQL_DATABASE=wordpress
14 | - MYSQL_USER=wordpress
15 | - MYSQL_PASSWORD=wordpress
16 | expose:
17 | - 3306
18 | - 33060
19 | wordpress:
20 | image: wordpress:latest
21 | ports:
22 | - 80:80
23 | restart: always
24 | environment:
25 | - WORDPRESS_DB_HOST=db
26 | - WORDPRESS_DB_USER=wordpress
27 | - WORDPRESS_DB_PASSWORD=wordpress
28 | - WORDPRESS_DB_NAME=wordpress
29 | volumes:
30 | db_data:
31 |
32 |
33 |
--------------------------------------------------------------------------------
/react-nginx/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "reactjs",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^5.11.4",
7 | "@testing-library/react": "^11.1.0",
8 | "@testing-library/user-event": "^12.1.10",
9 | "react": "^17.0.1",
10 | "react-dom": "^17.0.1",
11 | "react-scripts": "^5.0.0",
12 | "web-vitals": "^1.0.1"
13 | },
14 | "scripts": {
15 | "start": "react-scripts start",
16 | "build": "react-scripts build",
17 | "test": "react-scripts test",
18 | "eject": "react-scripts eject"
19 | },
20 | "eslintConfig": {
21 | "extends": [
22 | "react-app",
23 | "react-app/jest"
24 | ]
25 | },
26 | "browserslist": {
27 | "production": [
28 | ">0.2%",
29 | "not dead",
30 | "not op_mini all"
31 | ],
32 | "development": [
33 | "last 1 chrome version",
34 | "last 1 firefox version",
35 | "last 1 safari version"
36 | ]
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/nginx-golang/backend/Dockerfile:
--------------------------------------------------------------------------------
1 | # syntax=docker/dockerfile:1.4
2 | FROM --platform=$BUILDPLATFORM golang:1.18-alpine AS builder
3 |
4 | WORKDIR /code
5 |
6 | ENV CGO_ENABLED 0
7 | ENV GOPATH /go
8 | ENV GOCACHE /go-build
9 |
10 | COPY go.mod go.sum ./
11 | RUN --mount=type=cache,target=/go/pkg/mod/cache \
12 | go mod download
13 |
14 | COPY . .
15 |
16 | RUN --mount=type=cache,target=/go/pkg/mod/cache \
17 | --mount=type=cache,target=/go-build \
18 | go build -o bin/backend main.go
19 |
20 | CMD ["/code/bin/backend"]
21 |
22 | FROM builder as dev-envs
23 |
24 | RUN < {
8 | fetch("/api/")
9 | .then(res => res.json())
10 | .then(res => setMessage(res.message))
11 | .catch(console.error);
12 | }, [setMessage]);
13 | return (
14 |
31 | );
32 | }
33 |
34 | export default App;
35 |
--------------------------------------------------------------------------------
/react-express-mysql/frontend/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "frontend",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "react": "^17.0.2",
7 | "react-dom": "^17.0.2"
8 | },
9 | "scripts": {
10 | "start": "react-scripts start",
11 | "build": "react-scripts build",
12 | "test": "react-scripts test",
13 | "eject": "react-scripts eject"
14 | },
15 | "eslintConfig": {
16 | "extends": "react-app"
17 | },
18 | "browserslist": {
19 | "production": [
20 | ">0.2%",
21 | "not dead",
22 | "not op_mini all"
23 | ],
24 | "development": [
25 | "last 1 chrome version",
26 | "last 1 firefox version",
27 | "last 1 safari version"
28 | ]
29 | },
30 | "devDependencies": {
31 | "@testing-library/jest-dom": "^5.15.0",
32 | "@testing-library/react": "^12.1.2",
33 | "@testing-library/user-event": "^13.5.0",
34 | "http-proxy-middleware": "^2.0.1",
35 | "react-scripts": "^5.0.0"
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/react-rust-postgres/frontend/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "frontend",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^5.16.2",
7 | "@testing-library/react": "^9.5.0",
8 | "@testing-library/user-event": "^7.2.1",
9 | "react": "^16.13.1",
10 | "react-dom": "^16.13.1",
11 | "react-scripts": "^5.0.0"
12 | },
13 | "scripts": {
14 | "start": "react-scripts start",
15 | "build": "react-scripts build",
16 | "test": "react-scripts test",
17 | "eject": "react-scripts eject"
18 | },
19 | "eslintConfig": {
20 | "extends": "react-app"
21 | },
22 | "browserslist": {
23 | "production": [
24 | ">0.2%",
25 | "not dead",
26 | "not op_mini all"
27 | ],
28 | "development": [
29 | "last 1 chrome version",
30 | "last 1 firefox version",
31 | "last 1 safari version"
32 | ]
33 | },
34 | "devDependencies": {
35 | "http-proxy-middleware": "^1.0.3"
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/angular/angular/tsconfig.json:
--------------------------------------------------------------------------------
1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */
2 | {
3 | "compileOnSave": false,
4 | "compilerOptions": {
5 | "baseUrl": "./",
6 | "outDir": "./dist/out-tsc",
7 | "forceConsistentCasingInFileNames": true,
8 | "strict": true,
9 | "noImplicitOverride": true,
10 | "noPropertyAccessFromIndexSignature": true,
11 | "noImplicitReturns": true,
12 | "noFallthroughCasesInSwitch": true,
13 | "sourceMap": true,
14 | "declaration": false,
15 | "downlevelIteration": true,
16 | "experimentalDecorators": true,
17 | "moduleResolution": "node",
18 | "importHelpers": true,
19 | "target": "es2017",
20 | "module": "es2020",
21 | "lib": [
22 | "es2020",
23 | "dom"
24 | ]
25 | },
26 | "angularCompilerOptions": {
27 | "enableI18nLegacyMessageIdFormat": false,
28 | "strictInjectionParameters": true,
29 | "strictInputAccessModifiers": true,
30 | "strictTemplates": true
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/react-rust-postgres/frontend/src/App.js:
--------------------------------------------------------------------------------
1 | import React, { useEffect, useState } from "react";
2 | import logo from "./logo.svg";
3 | import "./App.css";
4 |
5 | function App() {
6 | const [message, setMessage] = useState();
7 | useEffect(() => {
8 | fetch("/api/users")
9 | .then((res) => res.json())
10 | .then((res) => setMessage(`Hello with ${res.length} users`))
11 | .catch(console.error);
12 | }, [setMessage]);
13 | return (
14 |
31 | );
32 | }
33 |
34 | export default App;
35 |
--------------------------------------------------------------------------------
/wasmedge-kafka-mysql/etl/Dockerfile:
--------------------------------------------------------------------------------
1 | # syntax=docker/dockerfile:1
2 | FROM --platform=$BUILDPLATFORM rust:1.64 AS buildbase
3 | RUN <"
10 | ],
11 | "description": "Form validation made easy",
12 | "main": "dist/jquery.validate.js",
13 | "keywords": [
14 | "forms",
15 | "validation",
16 | "validate"
17 | ],
18 | "license": "MIT",
19 | "ignore": [
20 | "**/.*",
21 | "node_modules",
22 | "bower_components",
23 | "test",
24 | "demo",
25 | "lib"
26 | ],
27 | "dependencies": {
28 | "jquery": ">= 1.7.2"
29 | },
30 | "version": "1.17.0",
31 | "_release": "1.17.0",
32 | "_resolution": {
33 | "type": "version",
34 | "tag": "1.17.0",
35 | "commit": "fc9b12d3bfaa2d0c04605855b896edb2934c0772"
36 | },
37 | "_source": "https://github.com/jzaefferer/jquery-validation.git",
38 | "_target": "^1.17.0",
39 | "_originalSource": "jquery-validation",
40 | "_direct": true
41 | }
--------------------------------------------------------------------------------
/wasmedge-kafka-mysql/.docker/docker-compose.yml:
--------------------------------------------------------------------------------
1 | services:
2 | redpanda:
3 | image: docker.redpanda.com/vectorized/redpanda:v22.2.2
4 | command:
5 | - redpanda start
6 | - --smp 1
7 | - --overprovisioned
8 | - --node-id 0
9 | - --kafka-addr PLAINTEXT://0.0.0.0:29092,OUTSIDE://0.0.0.0:9092
10 | - --advertise-kafka-addr PLAINTEXT://redpanda:29092,OUTSIDE://redpanda:9092
11 | - --pandaproxy-addr 0.0.0.0:8082
12 | - --advertise-pandaproxy-addr localhost:8082
13 | ports:
14 | - 8081:8081
15 | - 8082:8082
16 | - 9092:9092
17 | - 9644:9644
18 | - 29092:29092
19 | volumes:
20 | - ./kafka:/app
21 | etl:
22 | image: etl-kafka
23 | platform: wasi/wasm
24 | build:
25 | context: etl
26 | environment:
27 | DATABASE_URL: mysql://root:whalehello@db:3306/mysql
28 | KAFKA_URL: kafka://redpanda:9092/order
29 | RUST_BACKTRACE: full
30 | RUST_LOG: info
31 | restart: unless-stopped
32 | runtime: io.containerd.wasmedge.v1
33 | db:
34 | image: mariadb:10.9
35 | environment:
36 | MYSQL_ROOT_PASSWORD: whalehello
37 |
--------------------------------------------------------------------------------
/react-express-mongodb/frontend/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "my-app",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "axios": "^0.24.0",
7 | "bootstrap": "^5.1.3",
8 | "sass": "^1.43.4",
9 | "react": "^17.0.2",
10 | "react-dom": "^17.0.2"
11 | },
12 | "optionalDependencies": {
13 | "fsevents": "^2.1.2"
14 | },
15 | "devDependencies": {
16 | "@testing-library/jest-dom": "^5.15.0",
17 | "@testing-library/react": "^12.1.4",
18 | "@testing-library/user-event": "^7.2.1",
19 | "react-scripts": "^5.0.0"
20 | },
21 | "scripts": {
22 | "start": "react-scripts start",
23 | "build": "react-scripts build",
24 | "test": "react-scripts test",
25 | "eject": "react-scripts eject"
26 | },
27 | "eslintConfig": {
28 | "extends": "react-app"
29 | },
30 | "proxy": "http://backend:3000",
31 | "browserslist": {
32 | "production": [
33 | ">0.2%",
34 | "not dead",
35 | "not op_mini all"
36 | ],
37 | "development": [
38 | "last 1 chrome version",
39 | "last 1 firefox version",
40 | "last 1 safari version"
41 | ]
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/react-java-mysql/frontend/src/App.tsx:
--------------------------------------------------------------------------------
1 | import React, { useEffect, useState } from "react";
2 | import logo from "./logo.svg";
3 | import "./App.css";
4 |
5 | type Greeting = {
6 | id: number;
7 | name: string;
8 | };
9 |
10 | function App() {
11 | const [greeting, setGreeting] = useState();
12 | useEffect(() => {
13 | fetch("/api")
14 | .then(res => res.json())
15 | .then(setGreeting)
16 | .catch(console.error);
17 | }, [setGreeting]);
18 | return (
19 |
40 | );
41 | }
42 |
43 | export default App;
44 |
--------------------------------------------------------------------------------
/react-express-mysql/backend/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "node-docker-good-defaults",
3 | "private": true,
4 | "version": "2.0.1",
5 | "description": "Node.js Hello world app using docker features for easy docker compose local dev and solid production defaults",
6 | "author": "Bret Fisher ",
7 | "main": "src/index.js",
8 | "scripts": {
9 | "start": "node src/index.js",
10 | "start-watch": "nodemon src/index.js --inspect=0.0.0.0:9229",
11 | "start-wait-debuger": "nodemon src/index.js --inspect-brk=0.0.0.0:9229",
12 | "test": "cross-env NODE_ENV=test PORT=8081 mocha --timeout 10000 --exit --inspect=0.0.0.0:9230",
13 | "test-watch": "nodemon --exec \"npm test\"",
14 | "test-wait-debuger": "cross-env NODE_ENV=test PORT=8081 mocha --no-timeouts --exit --inspect-brk=0.0.0.0:9230"
15 | },
16 | "dependencies": {
17 | "express": "^4.17.1",
18 | "knex": "^0.95.11",
19 | "morgan": "^1.10.0",
20 | "mysql2": "^2.1.0"
21 | },
22 | "devDependencies": {
23 | "chai": "^4.2.0",
24 | "chai-http": "^4.3.0",
25 | "cross-env": "^7.0.2",
26 | "mocha": "^9.2.2",
27 | "nodemon": "^2.0.4"
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/angular/angular/README.md:
--------------------------------------------------------------------------------
1 | # Angular
2 |
3 | This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.0.1.
4 |
5 | ## Development server
6 |
7 | Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
8 |
9 | ## Code scaffolding
10 |
11 | Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
12 |
13 | ## Build
14 |
15 | Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
16 |
17 | ## Running unit tests
18 |
19 | Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
20 |
21 | ## Running end-to-end tests
22 |
23 | Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
24 |
25 | ## Further help
26 |
27 | To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
28 |
--------------------------------------------------------------------------------
/nginx-golang-postgres/.docker/docker-compose.yaml:
--------------------------------------------------------------------------------
1 | services:
2 | backend:
3 | build:
4 | context: backend
5 | target: dev-envs
6 | volumes:
7 | - /var/run/docker.sock:/var/run/docker.sock
8 | secrets:
9 | - db-password
10 | depends_on:
11 | db:
12 | condition: service_healthy
13 |
14 | db:
15 | image: postgres
16 | restart: always
17 | user: postgres
18 | secrets:
19 | - db-password
20 | volumes:
21 | - db-data:/var/lib/postgresql/data
22 | environment:
23 | - POSTGRES_DB=example
24 | - POSTGRES_PASSWORD_FILE=/run/secrets/db-password
25 | expose:
26 | - 5432
27 | healthcheck:
28 | test: [ "CMD", "pg_isready" ]
29 | interval: 10s
30 | timeout: 5s
31 | retries: 5
32 |
33 | proxy:
34 | image: nginx
35 | volumes:
36 | - type: bind
37 | source: ./proxy/nginx.conf
38 | target: /etc/nginx/conf.d/default.conf
39 | read_only: true
40 | ports:
41 | - 80:80
42 | depends_on:
43 | - backend
44 |
45 | volumes:
46 | db-data:
47 |
48 | secrets:
49 | db-password:
50 | file: db/password.txt
51 |
--------------------------------------------------------------------------------
/react-express-mysql/backend/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2015-2017 Bret Fisher
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/react-java-mysql/frontend/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "frontend",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^5.15.0",
7 | "@testing-library/react": "^12.1.2",
8 | "@testing-library/user-event": "^13.5.0",
9 | "@types/jest": "^27.0.3",
10 | "@types/node": "^16.11.9",
11 | "@types/react": "^17.0.35",
12 | "@types/react-dom": "^17.0.11",
13 | "react": "^17.0.2",
14 | "react-dom": "^17.0.2",
15 | "typescript": "^4.5.2"
16 | },
17 | "scripts": {
18 | "start": "react-scripts start",
19 | "build": "react-scripts build",
20 | "test": "react-scripts test",
21 | "eject": "react-scripts eject"
22 | },
23 | "eslintConfig": {
24 | "extends": "react-app"
25 | },
26 | "browserslist": {
27 | "production": [
28 | ">0.2%",
29 | "not dead",
30 | "not op_mini all"
31 | ],
32 | "development": [
33 | "last 1 chrome version",
34 | "last 1 firefox version",
35 | "last 1 safari version"
36 | ]
37 | },
38 | "devDependencies": {
39 | "http-proxy-middleware": "^2.0.1",
40 | "react-scripts": "^5.0.0"
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/aspnet-mssql/app/aspnetapp/wwwroot/lib/bootstrap/.bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "bootstrap",
3 | "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.",
4 | "keywords": [
5 | "css",
6 | "js",
7 | "less",
8 | "mobile-first",
9 | "responsive",
10 | "front-end",
11 | "framework",
12 | "web"
13 | ],
14 | "homepage": "http://getbootstrap.com",
15 | "license": "MIT",
16 | "moduleType": "globals",
17 | "main": [
18 | "less/bootstrap.less",
19 | "dist/js/bootstrap.js"
20 | ],
21 | "ignore": [
22 | "/.*",
23 | "_config.yml",
24 | "CNAME",
25 | "composer.json",
26 | "CONTRIBUTING.md",
27 | "docs",
28 | "js/tests",
29 | "test-infra"
30 | ],
31 | "dependencies": {
32 | "jquery": "1.9.1 - 3"
33 | },
34 | "version": "3.3.7",
35 | "_release": "3.3.7",
36 | "_resolution": {
37 | "type": "version",
38 | "tag": "v3.3.7",
39 | "commit": "0b9c4a4007c44201dce9a6cc1a38407005c26c86"
40 | },
41 | "_source": "https://github.com/twbs/bootstrap.git",
42 | "_target": "v3.3.7",
43 | "_originalSource": "bootstrap",
44 | "_direct": true
45 | }
--------------------------------------------------------------------------------
/nginx-wsgi-flask/nginx/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM nginx:1.19.7-alpine
2 |
3 | # Add bash for boot cmd
4 | RUN apk add bash
5 |
6 | # Add nginx.conf to container
7 | COPY --chown=nginx:nginx nginx.conf /etc/nginx/nginx.conf
8 | COPY --chown=nginx:nginx start.sh /app/start.sh
9 |
10 | # set workdir
11 | WORKDIR /app
12 |
13 | # permissions and nginx user for tightened security
14 | RUN chown -R nginx:nginx /app && chmod -R 755 /app && \
15 | chown -R nginx:nginx /var/cache/nginx && \
16 | chown -R nginx:nginx /var/log/nginx && \
17 | chmod -R 755 /var/log/nginx; \
18 | chown -R nginx:nginx /etc/nginx/conf.d
19 | RUN touch /var/run/nginx.pid && chown -R nginx:nginx /var/run/nginx.pid
20 |
21 | # # Uncomment to keep the nginx logs inside the container - Leave commented for logging to stdout and stderr
22 | # RUN mkdir -p /var/log/nginx
23 | # RUN unlink /var/log/nginx/access.log \
24 | # && unlink /var/log/nginx/error.log \
25 | # && touch /var/log/nginx/access.log \
26 | # && touch /var/log/nginx/error.log \
27 | # && chown nginx /var/log/nginx/*log \
28 | # && chmod 644 /var/log/nginx/*log
29 |
30 | USER nginx
31 |
32 | CMD ["nginx", "-g", "'daemon off;'"]
33 |
--------------------------------------------------------------------------------
/aspnet-mssql/app/aspnetapp/wwwroot/lib/bootstrap/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2011-2016 Twitter, Inc.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/react-express-mongodb/frontend/src/components/TodoList.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | export default class TodoList extends React.Component {
4 | constructor(props) {
5 | super(props);
6 |
7 | this.state = {
8 | activeIndex: 0,
9 | };
10 | }
11 |
12 | handleActive(index) {
13 | this.setState({
14 | activeIndex: index,
15 | });
16 | }
17 |
18 | renderTodos(todos) {
19 | return (
20 |
21 | {todos.map((todo, i) => (
22 | {
29 | this.handleActive(i);
30 | }}
31 | >
32 | {todo.text}
33 |
34 | ))}
35 |
36 | );
37 | }
38 |
39 | render() {
40 | let { todos } = this.props;
41 | return todos.length > 0 ? (
42 | this.renderTodos(todos)
43 | ) : (
44 |
45 | No Todos to display
46 |
47 | );
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/react-rust-postgres/compose.yaml:
--------------------------------------------------------------------------------
1 | name: react-rust-postgres
2 | services:
3 | frontend:
4 | build:
5 | context: frontend
6 | target: development
7 | networks:
8 | - client-side
9 | ports:
10 | - 3000:3000
11 | volumes:
12 | - ./frontend/src:/code/src:ro
13 |
14 | backend:
15 | build:
16 | context: backend
17 | target: development
18 | environment:
19 | - ADDRESS=0.0.0.0:8000
20 | - RUST_LOG=debug
21 | - PG_DBNAME=postgres
22 | - PG_HOST=db
23 | - PG_USER=postgres
24 | - PG_PASSWORD=mysecretpassword
25 | networks:
26 | - client-side
27 | - server-side
28 | volumes:
29 | - ./backend/src:/code/src
30 | - backend-cache:/code/target
31 | depends_on:
32 | - db
33 |
34 | db:
35 | image: postgres:12-alpine
36 | restart: always
37 | environment:
38 | - POSTGRES_PASSWORD=mysecretpassword
39 | networks:
40 | - server-side
41 | ports:
42 | - 5432:5432
43 | volumes:
44 | - db-data:/var/lib/postgresql/data
45 |
46 | networks:
47 | client-side: {}
48 | server-side: {}
49 |
50 | volumes:
51 | backend-cache: {}
52 | db-data: {}
53 |
--------------------------------------------------------------------------------
/react-rust-postgres/.docker/docker-compose.yaml:
--------------------------------------------------------------------------------
1 | name: react-rust-postgres
2 | services:
3 | frontend:
4 | build:
5 | context: ../frontend
6 | target: dev-envs
7 | networks:
8 | - client-side
9 | ports:
10 | - 3000:3000
11 | volumes:
12 | - /var/run/docker.sock:/var/run/docker.sock
13 |
14 | backend:
15 | build:
16 | context: ../backend
17 | target: dev-envs
18 | environment:
19 | - RUST_LOG=debug
20 | - PG_DBNAME=postgres
21 | - PG_HOST=db
22 | - PG_USER=postgres
23 | - PG_PASSWORD=mysecretpassword
24 | - ADDRESS=0.0.0.0:8000
25 | networks:
26 | - client-side
27 | - server-side
28 | volumes:
29 | - /var/run/docker.sock:/var/run/docker.sock
30 | depends_on:
31 | - db
32 |
33 | db:
34 | image: postgres:12-alpine
35 | restart: always
36 | environment:
37 | - POSTGRES_PASSWORD=mysecretpassword
38 | networks:
39 | - server-side
40 | ports:
41 | - 5432:5432
42 | volumes:
43 | - db-data:/var/lib/postgresql/data
44 |
45 | networks:
46 | client-side: {}
47 | server-side: {}
48 |
49 | volumes:
50 | backend-cache: {}
51 | db-data: {}
52 |
--------------------------------------------------------------------------------
/vuejs/vuejs/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vuejs",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "serve": "vue-cli-service serve",
7 | "build": "vue-cli-service build",
8 | "lint": "vue-cli-service lint"
9 | },
10 | "dependencies": {
11 | "ci": "^2.2.0",
12 | "core-js": "^3.14.0",
13 | "vue": "^2.6.14"
14 | },
15 | "devDependencies": {
16 | "@babel/eslint-parser": "^7.15.8",
17 | "@vue/cli-plugin-babel": "^5.0.1",
18 | "@vue/cli-plugin-eslint": "^5.0.1",
19 | "@vue/cli-service": "^5.0.1",
20 | "eslint": "^7.32.0",
21 | "eslint-plugin-vue": "^7.19.1",
22 | "vue-template-compiler": "^2.6.14"
23 | },
24 | "resolutions": {
25 | "glob-parent": "5.1.2",
26 | "set-value": "4.0.1",
27 | "nth-check": "2.0.1",
28 | "ansi-regex": "5.0.1"
29 | },
30 | "eslintConfig": {
31 | "root": true,
32 | "env": {
33 | "node": true
34 | },
35 | "extends": [
36 | "plugin:vue/essential",
37 | "eslint:recommended"
38 | ],
39 | "parserOptions": {
40 | "parser": "@babel/eslint-parser"
41 | },
42 | "rules": {}
43 | },
44 | "browserslist": [
45 | "> 1%",
46 | "last 2 versions"
47 | ]
48 | }
49 |
--------------------------------------------------------------------------------
/aspnet-mssql/app/aspnetapp/wwwroot/lib/jquery-validation/LICENSE.md:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 | =====================
3 |
4 | Copyright Jörn Zaefferer
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in
14 | all copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | THE SOFTWARE.
23 |
--------------------------------------------------------------------------------
/react-java-mysql/backend/Dockerfile:
--------------------------------------------------------------------------------
1 | # syntax=docker/dockerfile:1.4
2 |
3 | FROM --platform=$BUILDPLATFORM maven:3.8.5-eclipse-temurin-17 AS builder
4 | WORKDIR /workdir/server
5 | COPY pom.xml /workdir/server/pom.xml
6 | RUN mvn dependency:go-offline
7 |
8 | COPY src /workdir/server/src
9 | RUN mvn install
10 |
11 | FROM builder as dev-envs
12 |
13 | RUN < {
6 | beforeEach(async () => {
7 | await TestBed.configureTestingModule({
8 | imports: [
9 | RouterTestingModule
10 | ],
11 | declarations: [
12 | AppComponent
13 | ],
14 | }).compileComponents();
15 | });
16 |
17 | it('should create the app', () => {
18 | const fixture = TestBed.createComponent(AppComponent);
19 | const app = fixture.componentInstance;
20 | expect(app).toBeTruthy();
21 | });
22 |
23 | it(`should have as title 'angular'`, () => {
24 | const fixture = TestBed.createComponent(AppComponent);
25 | const app = fixture.componentInstance;
26 | expect(app.title).toEqual('angular');
27 | });
28 |
29 | it('should render title', () => {
30 | const fixture = TestBed.createComponent(AppComponent);
31 | fixture.detectChanges();
32 | const compiled = fixture.nativeElement as HTMLElement;
33 | expect(compiled.querySelector('.content span')?.textContent).toContain('angular app is running!');
34 | });
35 | });
36 |
--------------------------------------------------------------------------------
/nginx-aspnet-mysql/compose.yaml:
--------------------------------------------------------------------------------
1 | services:
2 | backend:
3 | build:
4 | context: backend
5 | restart: always
6 | secrets:
7 | - db-password
8 | depends_on:
9 | db:
10 | condition: service_healthy
11 | environment:
12 | - ASPNETCORE_URLS=http://+:8000
13 |
14 | db:
15 | # We use a mariadb image which supports both amd64 & arm64 architecture
16 | image: mariadb:10-focal
17 | # If you really want to use MySQL, uncomment the following line
18 | #image: mysql:8
19 | command: '--default-authentication-plugin=mysql_native_password'
20 | restart: always
21 | healthcheck:
22 | test: ['CMD-SHELL', 'mysqladmin ping -h 127.0.0.1 --password="$$(cat /run/secrets/db-password)" --silent']
23 | interval: 3s
24 | retries: 5
25 | start_period: 30s
26 | secrets:
27 | - db-password
28 | volumes:
29 | - db-data:/var/lib/mysql
30 | environment:
31 | - MYSQL_DATABASE=example
32 | - MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db-password
33 |
34 | proxy:
35 | build: proxy
36 | ports:
37 | - 80:80
38 | depends_on:
39 | - backend
40 |
41 | volumes:
42 | db-data:
43 |
44 | secrets:
45 | db-password:
46 | file: db/password.txt
47 |
--------------------------------------------------------------------------------
/react-express-mongodb/backend/routes/index.js:
--------------------------------------------------------------------------------
1 | const express = require("express");
2 | const serverResponses = require("../utils/helpers/responses");
3 | const messages = require("../config/messages");
4 | const { Todo } = require("../models/todos/todo");
5 |
6 | const routes = (app) => {
7 | const router = express.Router();
8 |
9 | router.post("/todos", (req, res) => {
10 | const todo = new Todo({
11 | text: req.body.text,
12 | });
13 |
14 | todo
15 | .save()
16 | .then((result) => {
17 | serverResponses.sendSuccess(res, messages.SUCCESSFUL, result);
18 | })
19 | .catch((e) => {
20 | serverResponses.sendError(res, messages.BAD_REQUEST, e);
21 | });
22 | });
23 |
24 | router.get("/", (req, res) => {
25 | Todo.find({}, { __v: 0 })
26 | .then((todos) => {
27 | serverResponses.sendSuccess(res, messages.SUCCESSFUL, todos);
28 | })
29 | .catch((e) => {
30 | serverResponses.sendError(res, messages.BAD_REQUEST, e);
31 | });
32 | });
33 |
34 | //it's a prefix before api it is useful when you have many modules and you want to
35 | //differentiate b/w each module you can use this technique
36 | app.use("/api", router);
37 | };
38 | module.exports = routes;
39 |
--------------------------------------------------------------------------------
/nginx-golang-mysql/.docker/docker-compose.yaml:
--------------------------------------------------------------------------------
1 | services:
2 | backend:
3 | build:
4 | context: backend
5 | target: dev-envs
6 | volumes:
7 | - /var/run/docker.sock:/var/run/docker.sock
8 | secrets:
9 | - db-password
10 | depends_on:
11 | db:
12 | condition: service_healthy
13 |
14 | db:
15 | image: mariadb:10-focal
16 | command: '--default-authentication-plugin=mysql_native_password'
17 | restart: always
18 | healthcheck:
19 | test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1", "--silent"]
20 | interval: 3s
21 | retries: 5
22 | start_period: 30s
23 | secrets:
24 | - db-password
25 | volumes:
26 | - db-data:/var/lib/mysql
27 | environment:
28 | - MYSQL_DATABASE=example
29 | - MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db-password
30 | expose:
31 | - 3306
32 |
33 | proxy:
34 | image: nginx
35 | volumes:
36 | - type: bind
37 | source: ./proxy/nginx.conf
38 | target: /etc/nginx/conf.d/default.conf
39 | read_only: true
40 | ports:
41 | - 80:80
42 | depends_on:
43 | - backend
44 |
45 | volumes:
46 | db-data:
47 |
48 | secrets:
49 | db-password:
50 | file: db/password.txt
51 |
--------------------------------------------------------------------------------
/react-java-mysql/backend/src/main/java/com/company/project/configuration/DockerSecretsProcessor.java:
--------------------------------------------------------------------------------
1 | package com.company.project.configuration;
2 |
3 | import java.io.IOException;
4 | import java.nio.charset.Charset;
5 |
6 | import org.springframework.boot.SpringApplication;
7 | import org.springframework.boot.env.EnvironmentPostProcessor;
8 | import org.springframework.core.env.ConfigurableEnvironment;
9 | import org.springframework.core.io.FileSystemResource;
10 | import org.springframework.core.io.Resource;
11 | import org.springframework.util.StreamUtils;
12 |
13 | /**
14 | * Read property from docker secret file.
15 | */
16 | public class DockerSecretsProcessor implements EnvironmentPostProcessor {
17 |
18 | @Override
19 | public void postProcessEnvironment(ConfigurableEnvironment environment, SpringApplication application) {
20 | Resource resource = new FileSystemResource("/run/secrets/db-password");
21 | if (resource.exists() && System.getProperty("MYSQL_PASSWORD") == null) {
22 | try {
23 | String dbPassword = StreamUtils.copyToString(resource.getInputStream(), Charset.defaultCharset());
24 | System.setProperty("MYSQL_PASSWORD", dbPassword);
25 | } catch (IOException e) {
26 | throw new RuntimeException(e);
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/aspnet-mssql/app/aspnetapp/Views/Shared/_ValidationScriptsPartial.cshtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
12 |
18 |
19 |
--------------------------------------------------------------------------------
/react-rust-postgres/backend/src/postgres.rs:
--------------------------------------------------------------------------------
1 | use deadpool_postgres::{Config, Pool};
2 | use tokio_postgres::NoTls;
3 | use tokio_postgres_migration::Migration;
4 |
5 | const SCRIPTS_UP: [(&str, &str); 1] = [(
6 | "0001_create-users",
7 | include_str!("../migrations/0001_create-users_up.sql"),
8 | )];
9 |
10 | fn create_config() -> Config {
11 | let mut cfg = Config::new();
12 | if let Ok(host) = std::env::var("PG_HOST") {
13 | cfg.host = Some(host);
14 | }
15 | if let Ok(dbname) = std::env::var("PG_DBNAME") {
16 | cfg.dbname = Some(dbname);
17 | }
18 | if let Ok(user) = std::env::var("PG_USER") {
19 | cfg.user = Some(user);
20 | }
21 | if let Ok(password) = std::env::var("PG_PASSWORD") {
22 | cfg.password = Some(password);
23 | }
24 | cfg
25 | }
26 |
27 | pub fn create_pool() -> Pool {
28 | create_config()
29 | .create_pool(NoTls)
30 | .expect("couldn't create postgres pool")
31 | }
32 |
33 | pub async fn migrate_up(pool: &Pool) {
34 | let mut client = pool.get().await.expect("couldn't get postgres client");
35 | let migration = Migration::new("migrations".to_string());
36 | migration
37 | .up(&mut **client, &SCRIPTS_UP)
38 | .await
39 | .expect("couldn't run migrations");
40 | }
41 |
--------------------------------------------------------------------------------
/react-nginx/Dockerfile:
--------------------------------------------------------------------------------
1 | # syntax=docker/dockerfile:1.4
2 |
3 | # 1. For build React app
4 | FROM node:lts AS development
5 |
6 | # Set working directory
7 | WORKDIR /app
8 |
9 | #
10 | COPY package.json /app/package.json
11 | COPY package-lock.json /app/package-lock.json
12 |
13 | # Same as npm install
14 | RUN npm ci
15 |
16 | COPY . /app
17 |
18 | ENV CI=true
19 | ENV PORT=3000
20 |
21 | CMD [ "npm", "start" ]
22 |
23 | FROM development AS build
24 |
25 | RUN npm run build
26 |
27 |
28 | FROM development as dev-envs
29 | RUN <