Current Mac Files
This commit is contained in:
12
compose-app-calendar-backend/docker-compose.yml
Normal file
12
compose-app-calendar-backend/docker-compose.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
services:
|
||||
app-be:
|
||||
image: us-central1-docker.pkg.dev/practice-ci-cd-williams/mis-desarrollos/app-calendar-backend:latest
|
||||
container_name: backend-calendar
|
||||
environment:
|
||||
- APP_EXP_HOST=app-to-practice.hlngc5z.mongodb.net
|
||||
- APP_EXP_DB=db-calendar
|
||||
- APP_EXP_USER=usr-calendar
|
||||
- APP_EXP_PWD=DtM0EXMkNPm71JDF
|
||||
- APP_EXP_JWT_KEY=m1.cl4V3-$3CR3t4.P4ra14papIr1C0IP1
|
||||
ports:
|
||||
- 8090:8080
|
||||
28
compose-app-expenses-backend/docker-compose.yml
Normal file
28
compose-app-expenses-backend/docker-compose.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
services:
|
||||
app-be:
|
||||
image: app-expenses-backend:latest
|
||||
container_name: backend
|
||||
environment:
|
||||
- APP_EXP_JWT_KEY=p4r@.lap4p1RiC01pY$
|
||||
- APP_EXP_HOST=app-to-practice.hlngc5z.mongodb.net
|
||||
- APP_EXP_USER=usr-expenses
|
||||
- APP_EXP_PWD=3xp3nse5.u53r
|
||||
- APP_EXP_DB=db-expenses
|
||||
ports:
|
||||
- 8090:8080
|
||||
app-be-localhost:
|
||||
image: app-expenses-backend:latest
|
||||
container_name: backend-localhost
|
||||
environment:
|
||||
- APP_EXP_JWT_KEY=p4r@.lap4p1RiC01pY$
|
||||
- APP_EXP_HOST=localhost:9009
|
||||
- APP_EXP_USER=usr-expenses
|
||||
- APP_EXP_PWD=3xp3nse5.u53r
|
||||
- APP_EXP_DB=db-expenses
|
||||
ports:
|
||||
- 8091:8080
|
||||
networks:
|
||||
- expenses-stack
|
||||
networks:
|
||||
expenses-stack:
|
||||
driver: bridge
|
||||
222
compose-env-airflow/docker-compose.yaml
Executable file
222
compose-env-airflow/docker-compose.yaml
Executable file
@@ -0,0 +1,222 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
|
||||
# Basic Airflow cluster configuration for CeleryExecutor with Redis and PostgreSQL.
|
||||
#
|
||||
# WARNING: This configuration is for local development. Do not use it in a production deployment.
|
||||
#
|
||||
# This configuration supports basic configuration using environment variables or an .env file
|
||||
# The following variables are supported:
|
||||
#
|
||||
# AIRFLOW_IMAGE_NAME - Docker image name used to run Airflow.
|
||||
# Default: apache/airflow:2.8.4
|
||||
# AIRFLOW_UID - User ID in Airflow containers
|
||||
# Default: 50000
|
||||
# AIRFLOW_PROJ_DIR - Base path to which all the files will be volumed.
|
||||
# Default: .
|
||||
# Those configurations are useful mostly in case of standalone testing/running Airflow in test/try-out mode
|
||||
#
|
||||
# _AIRFLOW_WWW_USER_USERNAME - Username for the administrator account (if requested).
|
||||
# Default: airflow
|
||||
# _AIRFLOW_WWW_USER_PASSWORD - Password for the administrator account (if requested).
|
||||
# Default: airflow
|
||||
# _PIP_ADDITIONAL_REQUIREMENTS - Additional PIP requirements to add when starting all containers.
|
||||
# Use this option ONLY for quick checks. Installing requirements at container
|
||||
# startup is done EVERY TIME the service is started.
|
||||
# A better way is to build a custom image or extend the official image
|
||||
# as described in https://airflow.apache.org/docs/docker-stack/build.html.
|
||||
# Default: ''
|
||||
#
|
||||
# Feel free to modify this file to suit your needs.
|
||||
---
|
||||
x-airflow-common:
|
||||
&airflow-common
|
||||
# In order to add custom dependencies or upgrade provider packages you can use your extended image.
|
||||
# Comment the image line, place your Dockerfile in the directory where you placed the docker-compose.yaml
|
||||
# and uncomment the "build" line below, Then run `docker-compose build` to build the images.
|
||||
image: ${AIRFLOW_IMAGE_NAME:-apache/airflow:2.8.4}
|
||||
# build: .
|
||||
environment:
|
||||
&airflow-common-env
|
||||
AIRFLOW__CORE__EXECUTOR: LocalExecutor
|
||||
AIRFLOW__DATABASE__SQL_ALCHEMY_CONN: postgresql+psycopg2://airflow:airflow@postgres/airflow
|
||||
AIRFLOW__CORE__FERNET_KEY: ''
|
||||
AIRFLOW__CORE__DAGS_ARE_PAUSED_AT_CREATION: 'true'
|
||||
AIRFLOW__CORE__LOAD_EXAMPLES: 'true'
|
||||
AIRFLOW__API__AUTH_BACKENDS: 'airflow.api.auth.backend.basic_auth,airflow.api.auth.backend.session'
|
||||
# yamllint disable rule:line-length
|
||||
# Use simple http server on scheduler for health checks
|
||||
# See https://airflow.apache.org/docs/apache-airflow/stable/administration-and-deployment/logging-monitoring/check-health.html#scheduler-health-check-server
|
||||
# yamllint enable rule:line-length
|
||||
AIRFLOW__SCHEDULER__ENABLE_HEALTH_CHECK: 'true'
|
||||
# WARNING: Use _PIP_ADDITIONAL_REQUIREMENTS option ONLY for a quick checks
|
||||
# for other purpose (development, test and especially production usage) build/extend Airflow image.
|
||||
_PIP_ADDITIONAL_REQUIREMENTS: ${_PIP_ADDITIONAL_REQUIREMENTS:-}
|
||||
volumes:
|
||||
- ${AIRFLOW_PROJ_DIR:-.}/dags:/opt/airflow/dags
|
||||
- ${AIRFLOW_PROJ_DIR:-.}/logs:/opt/airflow/logs
|
||||
- ${AIRFLOW_PROJ_DIR:-.}/config:/opt/airflow/config
|
||||
- ${AIRFLOW_PROJ_DIR:-.}/plugins:/opt/airflow/plugins
|
||||
user: "${AIRFLOW_UID:-50000}:0"
|
||||
depends_on:
|
||||
&airflow-common-depends-on
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:13
|
||||
environment:
|
||||
POSTGRES_USER: airflow
|
||||
POSTGRES_PASSWORD: airflow
|
||||
POSTGRES_DB: airflow
|
||||
volumes:
|
||||
- postgres-db-volume:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD", "pg_isready", "-U", "airflow"]
|
||||
interval: 10s
|
||||
retries: 5
|
||||
start_period: 5s
|
||||
restart: always
|
||||
|
||||
airflow-webserver:
|
||||
<<: *airflow-common
|
||||
command: webserver
|
||||
ports:
|
||||
- "8080:8080"
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "--fail", "http://localhost:8080/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
start_period: 30s
|
||||
restart: always
|
||||
depends_on:
|
||||
<<: *airflow-common-depends-on
|
||||
airflow-init:
|
||||
condition: service_completed_successfully
|
||||
|
||||
airflow-scheduler:
|
||||
<<: *airflow-common
|
||||
command: scheduler
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "--fail", "http://localhost:8974/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
start_period: 30s
|
||||
restart: always
|
||||
depends_on:
|
||||
<<: *airflow-common-depends-on
|
||||
airflow-init:
|
||||
condition: service_completed_successfully
|
||||
|
||||
airflow-triggerer:
|
||||
<<: *airflow-common
|
||||
command: triggerer
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", 'airflow jobs check --job-type TriggererJob --hostname "$${HOSTNAME}"']
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
start_period: 30s
|
||||
restart: always
|
||||
depends_on:
|
||||
<<: *airflow-common-depends-on
|
||||
airflow-init:
|
||||
condition: service_completed_successfully
|
||||
|
||||
airflow-init:
|
||||
<<: *airflow-common
|
||||
entrypoint: /bin/bash
|
||||
# yamllint disable rule:line-length
|
||||
command:
|
||||
- -c
|
||||
- |
|
||||
if [[ -z "${AIRFLOW_UID}" ]]; then
|
||||
echo
|
||||
echo -e "\033[1;33mWARNING!!!: AIRFLOW_UID not set!\e[0m"
|
||||
echo "If you are on Linux, you SHOULD follow the instructions below to set "
|
||||
echo "AIRFLOW_UID environment variable, otherwise files will be owned by root."
|
||||
echo "For other operating systems you can get rid of the warning with manually created .env file:"
|
||||
echo " See: https://airflow.apache.org/docs/apache-airflow/stable/howto/docker-compose/index.html#setting-the-right-airflow-user"
|
||||
echo
|
||||
fi
|
||||
one_meg=1048576
|
||||
mem_available=$$(($$(getconf _PHYS_PAGES) * $$(getconf PAGE_SIZE) / one_meg))
|
||||
cpus_available=$$(grep -cE 'cpu[0-9]+' /proc/stat)
|
||||
disk_available=$$(df / | tail -1 | awk '{print $$4}')
|
||||
warning_resources="false"
|
||||
if (( mem_available < 4000 )) ; then
|
||||
echo
|
||||
echo -e "\033[1;33mWARNING!!!: Not enough memory available for Docker.\e[0m"
|
||||
echo "At least 4GB of memory required. You have $$(numfmt --to iec $$((mem_available * one_meg)))"
|
||||
echo
|
||||
warning_resources="true"
|
||||
fi
|
||||
if (( cpus_available < 2 )); then
|
||||
echo
|
||||
echo -e "\033[1;33mWARNING!!!: Not enough CPUS available for Docker.\e[0m"
|
||||
echo "At least 2 CPUs recommended. You have $${cpus_available}"
|
||||
echo
|
||||
warning_resources="true"
|
||||
fi
|
||||
if (( disk_available < one_meg * 10 )); then
|
||||
echo
|
||||
echo -e "\033[1;33mWARNING!!!: Not enough Disk space available for Docker.\e[0m"
|
||||
echo "At least 10 GBs recommended. You have $$(numfmt --to iec $$((disk_available * 1024 )))"
|
||||
echo
|
||||
warning_resources="true"
|
||||
fi
|
||||
if [[ $${warning_resources} == "true" ]]; then
|
||||
echo
|
||||
echo -e "\033[1;33mWARNING!!!: You have not enough resources to run Airflow (see above)!\e[0m"
|
||||
echo "Please follow the instructions to increase amount of resources available:"
|
||||
echo " https://airflow.apache.org/docs/apache-airflow/stable/howto/docker-compose/index.html#before-you-begin"
|
||||
echo
|
||||
fi
|
||||
mkdir -p /sources/logs /sources/dags /sources/plugins
|
||||
chown -R "${AIRFLOW_UID}:0" /sources/{logs,dags,plugins}
|
||||
exec /entrypoint airflow version
|
||||
# yamllint enable rule:line-length
|
||||
environment:
|
||||
<<: *airflow-common-env
|
||||
_AIRFLOW_DB_MIGRATE: 'true'
|
||||
_AIRFLOW_WWW_USER_CREATE: 'true'
|
||||
_AIRFLOW_WWW_USER_USERNAME: ${_AIRFLOW_WWW_USER_USERNAME:-airflow}
|
||||
_AIRFLOW_WWW_USER_PASSWORD: ${_AIRFLOW_WWW_USER_PASSWORD:-airflow}
|
||||
_PIP_ADDITIONAL_REQUIREMENTS: ''
|
||||
user: "0:0"
|
||||
volumes:
|
||||
- ${AIRFLOW_PROJ_DIR:-.}:/sources
|
||||
|
||||
airflow-cli:
|
||||
<<: *airflow-common
|
||||
profiles:
|
||||
- debug
|
||||
environment:
|
||||
<<: *airflow-common-env
|
||||
CONNECTION_CHECK_MAX_COUNT: "0"
|
||||
# Workaround for entrypoint issue. See: https://github.com/apache/airflow/issues/16252
|
||||
command:
|
||||
- bash
|
||||
- -c
|
||||
- airflow
|
||||
|
||||
volumes:
|
||||
postgres-db-volume:
|
||||
10
compose-env-all-spark/docker-compose.yml
Executable file
10
compose-env-all-spark/docker-compose.yml
Executable file
@@ -0,0 +1,10 @@
|
||||
version: '3.7'
|
||||
|
||||
services:
|
||||
pyspark-notebook:
|
||||
image: jupyter/pyspark-notebook:latest
|
||||
container_name: jupyter-pyspark-notebook
|
||||
volumes:
|
||||
- /Volumes/HDD_MINI/dev_docker/docker_all_spark:/home/jovyan/work/data
|
||||
ports:
|
||||
- 8888:8888
|
||||
47
compose-env-app-custom-expenses/docker-compose.yml
Executable file
47
compose-env-app-custom-expenses/docker-compose.yml
Executable file
@@ -0,0 +1,47 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
app-db:
|
||||
image: mongodb/mongodb-community-server:4.4.13-ubi8
|
||||
#image: mongodb/mongodb-community-server:4.4.6-ubi8
|
||||
#image: mongodb/mongodb-community-server:latest
|
||||
#image: mongo:7.0.5-rc0-jammy
|
||||
container_name: api-db
|
||||
environment:
|
||||
MONGODB_INITDB_ROOT_USERNAME: root
|
||||
MONGODB_INITDB_ROOT_PASSWORD: test
|
||||
MONGO_INITDB_DATABASE: dbAppExpenses
|
||||
volumes:
|
||||
- /Volumes/HDD_MINI/dev_docker/app-custom-expenses/db/mongo-init.js:/docker-entrypoint-initdb.d/*.js:ro
|
||||
- /Volumes/HDD_MINI/dev_docker/app-custom-expenses/db/db:/data/db
|
||||
- /Volumes/HDD_MINI/dev_docker/app-custom-expenses/db/configdb/:/data/configdb
|
||||
- /Volumes/HDD_MINI/dev_docker/app-custom-expenses/db/log/:/var/log/mongodb
|
||||
ports:
|
||||
- 38082:27017
|
||||
networks:
|
||||
- app-stack
|
||||
app-be-api:
|
||||
depends_on:
|
||||
- app-db
|
||||
image: node:21-alpine3.18
|
||||
container_name: api-be
|
||||
ports:
|
||||
- 38081:8080
|
||||
working_dir: /home/node/app
|
||||
volumes:
|
||||
- /Volumes/HDD_MINI/dev_docker/app-custom-expenses/be/be-api-expenses:/home/node/app
|
||||
- /Volumes/HDD_MINI/dev_docker/app-custom-expenses/be/be-api-expenses/node_modules:/home/node/app/node_modules
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
#Este comando es para inicializar la app, esta es la mas comun?
|
||||
#si es que estoy usando nodemon - typescript - ts.node
|
||||
command: npm start
|
||||
#Este comando es para inicializar la app con live reload (nodemon)
|
||||
#si es que no trabajo con typescript
|
||||
#command: npm run dev
|
||||
networks:
|
||||
- app-stack
|
||||
# app-fe:
|
||||
networks:
|
||||
app-stack:
|
||||
driver: bridge
|
||||
76
compose-env-app-custom-expenses/old.docker-compose.yml
Executable file
76
compose-env-app-custom-expenses/old.docker-compose.yml
Executable file
@@ -0,0 +1,76 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
app-db:
|
||||
image: mongodb/mongodb-community-server:4.4.13-ubi8
|
||||
environment:
|
||||
MONGO_INITDB_ROOT_USERNAME: root
|
||||
MONGO_INITDB_ROOT_PASSWORD: test
|
||||
MONGO_INITDB_DATABASE: dbAppExpenses
|
||||
volumes:
|
||||
- /Volumes/HDD_MINI/dev_docker/app-custom-expenses/db/mongo-init.js:/docker-entrypoint-initdb.d/*.js:ro
|
||||
- /Volumes/HDD_MINI/dev_docker/app-custom-expenses/db/db/:/data/db
|
||||
#- /Volumes/HDD_MINI/dev_docker/app-custom-expenses/db/configdb/:/data/configdb
|
||||
- /Volumes/HDD_MINI/dev_docker/app-custom-expenses/db/log/:/var/log/mongodb
|
||||
ports:
|
||||
- 38082:27017
|
||||
networks:
|
||||
- app-stack
|
||||
app-db-admin:
|
||||
depends_on:
|
||||
- app-db
|
||||
image: mongo-express:latest
|
||||
ports:
|
||||
- 58081:8081
|
||||
environment:
|
||||
ME_CONFIG_BASICAUTH_USERNAME: admin
|
||||
ME_CONFIG_BASICAUTH_PASSWORD: test
|
||||
ME_CONFIG_MONGODB_ENABLE_ADMIN: "true"
|
||||
ME_CONFIG_MONGODB_ADMINUSERNAME: root
|
||||
ME_CONFIG_MONGODB_ADMINPASSWORD: test
|
||||
ME_CONFIG_MONGODB_PORT: 27017
|
||||
ME_CONFIG_MONGODB_SERVER: app-db
|
||||
networks:
|
||||
- app-stack
|
||||
app-be:
|
||||
depends_on:
|
||||
- app-db
|
||||
image: node:21-alpine3.18
|
||||
ports:
|
||||
- 38080:8080
|
||||
working_dir: /home/node/app
|
||||
volumes:
|
||||
- /Volumes/HDD_MINI/dev_docker/app-custom-expenses/be/be-01:/home/node/app
|
||||
- /Volumes/HDD_MINI/dev_docker/app-custom-expenses/be/be-01/node_modules:/home/node/app/node_modules
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
#Este comando es para inicializar la app
|
||||
#command: npm start
|
||||
#Este comando es para inicializar la app con live reload (nodemon)
|
||||
command: npm run dev
|
||||
networks:
|
||||
- app-stack
|
||||
app-be-api:
|
||||
depends_on:
|
||||
- app-db
|
||||
image: node:21-alpine3.18
|
||||
ports:
|
||||
- 38081:8080
|
||||
working_dir: /home/node/app
|
||||
volumes:
|
||||
- /Volumes/HDD_MINI/dev_docker/app-custom-expenses/be/be-api:/home/node/app
|
||||
- /Volumes/HDD_MINI/dev_docker/app-custom-expenses/be/be-api/node_modules:/home/node/app/node_modules
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
#Este comando es para inicializar la app, esta es la mas comun?
|
||||
#si es que estoy usando nodemon - typescript - ts.node
|
||||
command: npm start
|
||||
#Este comando es para inicializar la app con live reload (nodemon)
|
||||
#si es que no trabajo con typescript
|
||||
#command: npm run dev
|
||||
networks:
|
||||
- app-stack
|
||||
# app-fe:
|
||||
networks:
|
||||
app-stack:
|
||||
driver: bridge
|
||||
24
compose-env-curso-oracle/docker-compose.yml
Executable file
24
compose-env-curso-oracle/docker-compose.yml
Executable file
@@ -0,0 +1,24 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
front-screenmatch:
|
||||
image: httpd:latest
|
||||
container_name: web-screenmatch
|
||||
volumes:
|
||||
- "/Volumes/HDD_MINI/dev_varios/curso-oracle-backend/2086-screenmatch-front-end/:/usr/local/apache2/htdocs/"
|
||||
ports:
|
||||
- 9080:80
|
||||
networks:
|
||||
- front-end-stack
|
||||
front-genera-frases:
|
||||
image: httpd:latest
|
||||
container_name: web-genera-frases
|
||||
volumes:
|
||||
- "/Volumes/HDD_MINI/dev_varios/curso-oracle-backend/2086-java-desafio-front/:/usr/local/apache2/htdocs/"
|
||||
ports:
|
||||
- 9081:80
|
||||
networks:
|
||||
- front-end-stack
|
||||
networks:
|
||||
front-end-stack:
|
||||
driver: bridge
|
||||
33
compose-env-java-spring-mysql/docker-compose.yml
Executable file
33
compose-env-java-spring-mysql/docker-compose.yml
Executable file
@@ -0,0 +1,33 @@
|
||||
services:
|
||||
db:
|
||||
image: bitnami/mysql:8.0
|
||||
container_name: spring-db
|
||||
environment:
|
||||
MYSQL_USER: test
|
||||
MYSQL_PASSWORD: test
|
||||
MYSQL_ROOT_PASSWORD: test
|
||||
MYSQL_ALLOW_EMPTY_PASSWORD: 1
|
||||
volumes:
|
||||
- /Volumes/HDD_MINI/dev_docker/docker_mysql/mysql_java_spring:/bitnami/mysql/data
|
||||
ports:
|
||||
- 9007:3306
|
||||
networks:
|
||||
- spring-stack
|
||||
spring-api:
|
||||
image: choboboy/my_own_container:latest
|
||||
container_name: spring-forohub
|
||||
environment:
|
||||
- ALURA_HOST=db
|
||||
- ALURA_DB=forohub
|
||||
- ALURA_DB_USR=root
|
||||
- ALURA_DB_PWD=test
|
||||
- ALURA_JWT_KEY=123456
|
||||
depends_on:
|
||||
- db
|
||||
ports:
|
||||
- 9008:8080
|
||||
networks:
|
||||
- spring-stack
|
||||
networks:
|
||||
spring-stack:
|
||||
driver: bridge
|
||||
63
compose-env-laravel-8/docker-compose.yml
Executable file
63
compose-env-laravel-8/docker-compose.yml
Executable file
@@ -0,0 +1,63 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
db:
|
||||
image: mysql:latest
|
||||
container_name: laravel-blog-db
|
||||
environment:
|
||||
MYSQL_DATABASE: laravel
|
||||
MYSQL_USER: test
|
||||
MYSQL_PASSWORD: test
|
||||
MYSQL_ROOT_PASSWORD: test
|
||||
MYSQL_ALLOW_EMPTY_PASSWORD: 1
|
||||
volumes:
|
||||
#- /Volumes/HDD_MINI/dev_docker/docker_lamp_5_6_39/scriptsdb:/docker-entrypoint-initdb.d
|
||||
- /Volumes/HDD_MINI/dev_docker/docker_laravel/databases/blog:/var/lib/mysql
|
||||
user: mysql
|
||||
networks:
|
||||
- laravel-blog-stack
|
||||
php-blog:
|
||||
depends_on:
|
||||
- db
|
||||
build:
|
||||
context: ./docker-file-php
|
||||
dockerfile: Dockerfile
|
||||
container_name: laravel-blog-php
|
||||
volumes:
|
||||
- "/Volumes/HDD_MINI/dev_docker/docker_laravel/webs/blog/:/var/www/html"
|
||||
#ports:
|
||||
# - 9080:80
|
||||
# - 9081:443
|
||||
networks:
|
||||
- laravel-blog-stack
|
||||
nginx-blog:
|
||||
build:
|
||||
context: ./docker-file-nginx
|
||||
dockerfile: Dockerfile
|
||||
container_name: laravel-blog-nginx
|
||||
ports:
|
||||
- 9083:80
|
||||
depends_on:
|
||||
- php-blog
|
||||
volumes:
|
||||
- "/Volumes/HDD_MINI/dev_docker/docker_laravel/webs/blog/:/var/www/html"
|
||||
networks:
|
||||
- laravel-blog-stack
|
||||
phpmyadmin:
|
||||
depends_on:
|
||||
- db
|
||||
image: phpmyadmin:apache
|
||||
container_name: laravel-blog-myadmin
|
||||
ports:
|
||||
- 9082:80
|
||||
environment:
|
||||
- PMA_HOST=db
|
||||
- PMA_PORT=3306
|
||||
- UPLOAD_LIMIT=500M
|
||||
- MEMORY_LIMIT=5000M
|
||||
- MAX_EXECUTION_TIME=0
|
||||
networks:
|
||||
- laravel-blog-stack
|
||||
networks:
|
||||
laravel-blog-stack:
|
||||
driver: bridge
|
||||
4
compose-env-laravel-8/docker-file-nginx/Dockerfile
Executable file
4
compose-env-laravel-8/docker-file-nginx/Dockerfile
Executable file
@@ -0,0 +1,4 @@
|
||||
FROM nginx
|
||||
RUN apt update
|
||||
RUN apt install -y vim
|
||||
COPY conf/default.conf /etc/nginx/conf.d
|
||||
31
compose-env-laravel-8/docker-file-nginx/conf/default.conf
Executable file
31
compose-env-laravel-8/docker-file-nginx/conf/default.conf
Executable file
@@ -0,0 +1,31 @@
|
||||
server {
|
||||
listen 80 default_server;
|
||||
|
||||
server_name localhost;
|
||||
root /var/www/html/public;
|
||||
|
||||
error_log /var/log/nginx/error.log;
|
||||
access_log /var/log/nginx/access.log;
|
||||
|
||||
index index.html index.php;
|
||||
|
||||
client_max_body_size 5M;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri /index.php$is_args$args;
|
||||
}
|
||||
|
||||
location ~ ^/.+\.php(/|$) {
|
||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||
if (!-f $document_root$fastcgi_script_name) {
|
||||
return 404;
|
||||
}
|
||||
include fastcgi_params;
|
||||
fastcgi_pass php-blog:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
||||
fastcgi_param DOCUMENT_ROOT $realpath_root;
|
||||
fastcgi_param REALPATHTEST $realpath_root;
|
||||
internal;
|
||||
}
|
||||
}
|
||||
5
compose-env-laravel-8/docker-file-php/90-xdebug.ini
Executable file
5
compose-env-laravel-8/docker-file-php/90-xdebug.ini
Executable file
@@ -0,0 +1,5 @@
|
||||
zend_extension=xdebug.so
|
||||
xdebug.mode=develop,debug
|
||||
xdebug.start_with_request=yes
|
||||
xdebug.discover_client_host=0
|
||||
xdebug.client_host=host.docker.internal
|
||||
19
compose-env-laravel-8/docker-file-php/Dockerfile
Executable file
19
compose-env-laravel-8/docker-file-php/Dockerfile
Executable file
@@ -0,0 +1,19 @@
|
||||
FROM php:8.3.1-fpm-alpine
|
||||
|
||||
#Referencia solucion https://github.com/caohoangtu/docker-laravel/tree/master
|
||||
RUN apk add --update --no-cache autoconf g++ make openssl-dev
|
||||
RUN apk add libpng-dev
|
||||
RUN apk add libzip-dev
|
||||
RUN apk add --update linux-headers
|
||||
|
||||
RUN docker-php-ext-install gd
|
||||
RUN docker-php-ext-install zip
|
||||
RUN docker-php-ext-install bcmath
|
||||
RUN docker-php-ext-install sockets
|
||||
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
||||
|
||||
RUN docker-php-ext-install mysqli pdo pdo_mysql && docker-php-ext-enable pdo_mysql
|
||||
|
||||
#install xdebug
|
||||
RUN pecl install xdebug
|
||||
COPY 90-xdebug.ini "${PHP_INI_DIR}"/conf.d
|
||||
66
compose-env-laravel/docker-compose.yml
Executable file
66
compose-env-laravel/docker-compose.yml
Executable file
@@ -0,0 +1,66 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
db:
|
||||
#image: mysql:latest
|
||||
image: mariadb:latest
|
||||
container_name: laravel-db
|
||||
environment:
|
||||
MYSQL_DATABASE: laravel
|
||||
MYSQL_USER: test
|
||||
MYSQL_PASSWORD: test
|
||||
MYSQL_ROOT_PASSWORD: test
|
||||
MYSQL_ALLOW_EMPTY_PASSWORD: 1
|
||||
volumes:
|
||||
#- /Volumes/HDD_MINI/dev_docker/docker_lamp_5_6_39/scriptsdb:/docker-entrypoint-initdb.d
|
||||
- /Volumes/HDD_MINI/dev_docker/docker_laravel/databases/test-docker-app:/var/lib/mysql
|
||||
user: mysql
|
||||
ports:
|
||||
- 9081:3306
|
||||
networks:
|
||||
- laravel-stack
|
||||
php-test-docker-app:
|
||||
depends_on:
|
||||
- db
|
||||
build:
|
||||
context: ./docker-file-php
|
||||
dockerfile: Dockerfile
|
||||
container_name: laravel-php
|
||||
volumes:
|
||||
- "/Volumes/HDD_MINI/dev_docker/docker_laravel/webs/test-docker-app/:/var/www/html"
|
||||
#ports:
|
||||
# - 9080:80
|
||||
# - 9081:443
|
||||
networks:
|
||||
- laravel-stack
|
||||
nginx-test-docker-app:
|
||||
build:
|
||||
context: ./docker-file-nginx
|
||||
dockerfile: Dockerfile
|
||||
container_name: laravel-nginx
|
||||
ports:
|
||||
- 9083:80
|
||||
depends_on:
|
||||
- php-test-docker-app
|
||||
volumes:
|
||||
- "/Volumes/HDD_MINI/dev_docker/docker_laravel/webs/test-docker-app/:/var/www/html"
|
||||
networks:
|
||||
- laravel-stack
|
||||
phpmyadmin:
|
||||
depends_on:
|
||||
- db
|
||||
image: phpmyadmin:apache
|
||||
container_name: laravel-myadmin
|
||||
ports:
|
||||
- 9082:80
|
||||
environment:
|
||||
- PMA_HOST=db
|
||||
- PMA_PORT=3306
|
||||
- UPLOAD_LIMIT=500M
|
||||
- MEMORY_LIMIT=5000M
|
||||
- MAX_EXECUTION_TIME=0
|
||||
networks:
|
||||
- laravel-stack
|
||||
networks:
|
||||
laravel-stack:
|
||||
driver: bridge
|
||||
4
compose-env-laravel/docker-file-nginx/Dockerfile
Executable file
4
compose-env-laravel/docker-file-nginx/Dockerfile
Executable file
@@ -0,0 +1,4 @@
|
||||
FROM nginx
|
||||
RUN apt update
|
||||
RUN apt install -y vim
|
||||
COPY conf/default.conf /etc/nginx/conf.d
|
||||
31
compose-env-laravel/docker-file-nginx/conf/default.conf
Executable file
31
compose-env-laravel/docker-file-nginx/conf/default.conf
Executable file
@@ -0,0 +1,31 @@
|
||||
server {
|
||||
listen 80 default_server;
|
||||
|
||||
server_name localhost;
|
||||
root /var/www/html/public;
|
||||
|
||||
error_log /var/log/nginx/error.log;
|
||||
access_log /var/log/nginx/access.log;
|
||||
|
||||
index index.html index.php;
|
||||
|
||||
client_max_body_size 5M;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri /index.php$is_args$args;
|
||||
}
|
||||
|
||||
location ~ ^/.+\.php(/|$) {
|
||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||
if (!-f $document_root$fastcgi_script_name) {
|
||||
return 404;
|
||||
}
|
||||
include fastcgi_params;
|
||||
fastcgi_pass php-test-docker-app:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
||||
fastcgi_param DOCUMENT_ROOT $realpath_root;
|
||||
fastcgi_param REALPATHTEST $realpath_root;
|
||||
internal;
|
||||
}
|
||||
}
|
||||
5
compose-env-laravel/docker-file-php/90-xdebug.ini
Executable file
5
compose-env-laravel/docker-file-php/90-xdebug.ini
Executable file
@@ -0,0 +1,5 @@
|
||||
zend_extension=xdebug.so
|
||||
xdebug.mode=develop,debug
|
||||
xdebug.start_with_request=yes
|
||||
xdebug.discover_client_host=0
|
||||
xdebug.client_host=host.docker.internal
|
||||
19
compose-env-laravel/docker-file-php/Dockerfile
Executable file
19
compose-env-laravel/docker-file-php/Dockerfile
Executable file
@@ -0,0 +1,19 @@
|
||||
FROM php:8.3.1-fpm-alpine
|
||||
|
||||
#Referencia solucion https://github.com/caohoangtu/docker-laravel/tree/master
|
||||
RUN apk add --update --no-cache autoconf g++ make openssl-dev
|
||||
RUN apk add libpng-dev
|
||||
RUN apk add libzip-dev
|
||||
RUN apk add --update linux-headers
|
||||
|
||||
RUN docker-php-ext-install gd
|
||||
RUN docker-php-ext-install zip
|
||||
RUN docker-php-ext-install bcmath
|
||||
RUN docker-php-ext-install sockets
|
||||
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
||||
|
||||
RUN docker-php-ext-install mysqli pdo pdo_mysql && docker-php-ext-enable pdo_mysql
|
||||
|
||||
#install xdebug
|
||||
RUN pecl install xdebug
|
||||
COPY 90-xdebug.ini "${PHP_INI_DIR}"/conf.d
|
||||
47
compose-env-mern/docker-compose.yml
Executable file
47
compose-env-mern/docker-compose.yml
Executable file
@@ -0,0 +1,47 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
app-db:
|
||||
image: mongodb/mongodb-community-server:4.4.13-ubi8
|
||||
#image: mongodb/mongodb-community-server:4.4.6-ubi8
|
||||
#image: mongodb/mongodb-community-server:latest
|
||||
#image: mongo:7.0.5-rc0-jammy
|
||||
container_name: api-db
|
||||
environment:
|
||||
MONGODB_INITDB_ROOT_USERNAME: root
|
||||
MONGODB_INITDB_ROOT_PASSWORD: test
|
||||
MONGO_INITDB_DATABASE: dbAppExpenses
|
||||
volumes:
|
||||
- /Volumes/HDD_MINI/dev_docker/app-custom-expenses/db/mongo-init.js:/docker-entrypoint-initdb.d/*.js:ro
|
||||
- /Volumes/HDD_MINI/dev_docker/app-custom-expenses/db/db:/data/db
|
||||
- /Volumes/HDD_MINI/dev_docker/app-custom-expenses/db/configdb/:/data/configdb
|
||||
- /Volumes/HDD_MINI/dev_docker/app-custom-expenses/db/log/:/var/log/mongodb
|
||||
ports:
|
||||
- 38082:27017
|
||||
networks:
|
||||
- app-stack
|
||||
app-be-api:
|
||||
depends_on:
|
||||
- app-db
|
||||
image: node:21-alpine3.18
|
||||
container_name: api-be
|
||||
ports:
|
||||
- 38081:8080
|
||||
working_dir: /home/node/app
|
||||
volumes:
|
||||
- /Volumes/HDD_MINI/dev_docker/app-custom-expenses/be/be-api-expenses:/home/node/app
|
||||
- /Volumes/HDD_MINI/dev_docker/app-custom-expenses/be/be-api-expenses/node_modules:/home/node/app/node_modules
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
#Este comando es para inicializar la app, esta es la mas comun?
|
||||
#si es que estoy usando nodemon - typescript - ts.node
|
||||
command: npm start
|
||||
#Este comando es para inicializar la app con live reload (nodemon)
|
||||
#si es que no trabajo con typescript
|
||||
#command: npm run dev
|
||||
networks:
|
||||
- app-stack
|
||||
# app-fe:
|
||||
networks:
|
||||
app-stack:
|
||||
driver: bridge
|
||||
36
compose-env-mongodb/docker-compose.yml
Executable file
36
compose-env-mongodb/docker-compose.yml
Executable file
@@ -0,0 +1,36 @@
|
||||
services:
|
||||
db:
|
||||
image: mongodb/mongodb-community-server:7.0.7-ubi9
|
||||
container_name: java-mongodb
|
||||
environment:
|
||||
MONGODB_INITDB_ROOT_USERNAME: root
|
||||
MONGODB_INITDB_ROOT_PASSWORD: test
|
||||
MONGO_INITDB_DATABASE: db-expenses
|
||||
volumes:
|
||||
- /Volumes/HDD_MINI/dev_docker/docker_mongodb/db-expenses/mongo-init.js:/docker-entrypoint-initdb.d/*.js:ro
|
||||
- /Volumes/HDD_MINI/dev_docker/docker_mongodb/db-expenses/db:/data/db
|
||||
- /Volumes/HDD_MINI/dev_docker/docker_mongodb/db-expenses/configdb/:/data/configdb
|
||||
- /Volumes/HDD_MINI/dev_docker/docker_mongodb/db-expenses/log/:/var/log/mongodb
|
||||
ports:
|
||||
- 9009:27017
|
||||
networks:
|
||||
- expenses-stack
|
||||
db-test:
|
||||
image: mongodb/mongodb-community-server:7.0.7-ubi9
|
||||
container_name: java-mongodb-test
|
||||
environment:
|
||||
MONGODB_INITDB_ROOT_USERNAME: root
|
||||
MONGODB_INITDB_ROOT_PASSWORD: test
|
||||
MONGO_INITDB_DATABASE: db-expenses-test
|
||||
volumes:
|
||||
- /Volumes/HDD_MINI/dev_docker/docker_mongodb/db-expenses-test/mongo-init.js:/docker-entrypoint-initdb.d/*.js:ro
|
||||
- /Volumes/HDD_MINI/dev_docker/docker_mongodb/db-expenses-test/db:/data/db
|
||||
- /Volumes/HDD_MINI/dev_docker/docker_mongodb/db-expenses-test/configdb/:/data/configdb
|
||||
- /Volumes/HDD_MINI/dev_docker/docker_mongodb/db-expenses-test/log/:/var/log/mongodb
|
||||
ports:
|
||||
- 9008:27017
|
||||
networks:
|
||||
- expenses-stack
|
||||
networks:
|
||||
expenses-stack:
|
||||
driver: bridge
|
||||
20
compose-env-mysql/docker-compose.yml
Executable file
20
compose-env-mysql/docker-compose.yml
Executable file
@@ -0,0 +1,20 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
db:
|
||||
image: bitnami/mysql:8.0
|
||||
container_name: java-mysql
|
||||
environment:
|
||||
MYSQL_USER: test
|
||||
MYSQL_PASSWORD: test
|
||||
MYSQL_ROOT_PASSWORD: test
|
||||
MYSQL_ALLOW_EMPTY_PASSWORD: 1
|
||||
volumes:
|
||||
- /Volumes/HDD_MINI/dev_docker/docker_mysql/mysql_alura:/bitnami/mysql/data
|
||||
ports:
|
||||
- 9006:3306
|
||||
networks:
|
||||
- java-stack
|
||||
networks:
|
||||
java-stack:
|
||||
driver: bridge
|
||||
22
compose-env-postgresql/docker-compose.yml
Executable file
22
compose-env-postgresql/docker-compose.yml
Executable file
@@ -0,0 +1,22 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
db:
|
||||
#image: postgres:13.14-bullseye
|
||||
image: bitnami/postgresql:16.2.0
|
||||
container_name: java-postgres
|
||||
environment:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
#PGDATA: /var/lib/postgresql/data/pgdata
|
||||
volumes:
|
||||
#- /Volumes/HDD_MINI/dev_docker/docker_postgresql/java_postgresql:/var/lib/postgresql/data
|
||||
#- /Volumes/HDD_MINI/dev_docker/docker_postgresql/java_postgresql:/var/lib/postgresql
|
||||
- /Volumes/HDD_MINI/dev_docker/docker_postgresql/java_postgresql:/bitnami/postgresql
|
||||
ports:
|
||||
- 5433:5432
|
||||
networks:
|
||||
- java-stack
|
||||
networks:
|
||||
java-stack:
|
||||
driver: bridge
|
||||
38
compose-env-react-hooks-mern/docker-compose.yml
Executable file
38
compose-env-react-hooks-mern/docker-compose.yml
Executable file
@@ -0,0 +1,38 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
app-intro-js:
|
||||
#depends_on:
|
||||
# - app-db
|
||||
image: node:21-alpine3.18
|
||||
container_name: intro-js-react-hooks-mern
|
||||
ports:
|
||||
- 38081:8080
|
||||
- 38083:3000
|
||||
working_dir: /home/node/app
|
||||
volumes:
|
||||
- /Volumes/HDD_MINI/dev_docker/docker_react_hooks_mern/02-intro-javascript:/home/node/app
|
||||
- /Volumes/HDD_MINI/dev_docker/docker_react_hooks_mern/02-intro-javascript/node_modules:/home/node/app/node_modules
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- WDS_SOCKET_PORT=0
|
||||
#Este comando es para inicializar la app, esta es la mas comun?
|
||||
#si es que estoy usando nodemon - typescript - ts.node
|
||||
command: npm start
|
||||
#Este comando es para inicializar la app con live reload (nodemon)
|
||||
#si es que no trabajo con typescript
|
||||
#command: npm run dev
|
||||
networks:
|
||||
- react-stack
|
||||
app-http:
|
||||
image: httpd:latest
|
||||
container_name: fe-react-hooks-mern
|
||||
volumes:
|
||||
- "/Volumes/HDD_MINI/dev_docker/docker_react_hooks_mern/01-intro-react/:/usr/local/apache2/htdocs/"
|
||||
ports:
|
||||
- 38082:80
|
||||
networks:
|
||||
- react-stack
|
||||
networks:
|
||||
react-stack:
|
||||
driver: bridge
|
||||
19
compose-env-siad/Dockerfile
Executable file
19
compose-env-siad/Dockerfile
Executable file
@@ -0,0 +1,19 @@
|
||||
FROM php:5.6.39-apache
|
||||
|
||||
#Referencia solucion https://stackoverflow.com/questions/76094428/debian-stretch-repositories-404-not-found
|
||||
RUN sed -i -e 's/deb.debian.org/archive.debian.org/g' \
|
||||
-e 's|security.debian.org|archive.debian.org/|g' \
|
||||
-e '/stretch-updates/d' /etc/apt/sources.list
|
||||
|
||||
RUN apt-get update && apt-get install -y libmcrypt-dev \
|
||||
&& docker-php-ext-install mcrypt
|
||||
|
||||
#Ejecuto comando para instalar certificado ssl
|
||||
#Referencia solucion https://github.com/nezhar/php-docker-ssl/tree/master
|
||||
RUN openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/ssl-cert-snakeoil.key -out /etc/ssl/certs/ssl-cert-snakeoil.pem -subj "/C=AT/ST=Vienna/L=Vienna/O=Security/OU=Development/CN=example.com"
|
||||
|
||||
RUN a2enmod rewrite
|
||||
|
||||
#Ejecuta comando referente a la instalacion de ssl
|
||||
RUN a2ensite default-ssl
|
||||
RUN a2enmod ssl
|
||||
49
compose-env-siad/docker-compose.yml
Executable file
49
compose-env-siad/docker-compose.yml
Executable file
@@ -0,0 +1,49 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
db:
|
||||
image: mariadb:5.5.60
|
||||
environment:
|
||||
MYSQL_DATABASE: test_docker
|
||||
MYSQL_USER: test
|
||||
MYSQL_PASSWORD: test
|
||||
MYSQL_ROOT_PASSWORD: test
|
||||
MYSQL_ALLOW_EMPTY_PASSWORD: 1
|
||||
volumes:
|
||||
#- /Volumes/HDD_MINI/dev_docker/docker_lamp_5_6_39/scriptsdb:/docker-entrypoint-initdb.d
|
||||
- /Volumes/HDD_MINI/dev_docker/docker_lamp_5_6_39/databases:/var/lib/mysql
|
||||
user: mysql
|
||||
networks:
|
||||
- siad-stack
|
||||
website:
|
||||
depends_on:
|
||||
- db
|
||||
#image: php:5.6.39-apache-jessie
|
||||
#image: php:5.6.39-apache
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
volumes:
|
||||
- "/Volumes/HDD_MINI/dev_docker/docker_lamp_5_6_39/webs/:/var/www/html"
|
||||
ports:
|
||||
- 9080:80
|
||||
- 9443:443
|
||||
networks:
|
||||
- siad-stack
|
||||
phpmyadmin:
|
||||
depends_on:
|
||||
- db
|
||||
image: phpmyadmin:apache
|
||||
ports:
|
||||
- 9280:80
|
||||
environment:
|
||||
- PMA_HOST=db
|
||||
- PMA_PORT=3306
|
||||
- UPLOAD_LIMIT=500M
|
||||
- MEMORY_LIMIT=5000M
|
||||
- MAX_EXECUTION_TIME=0
|
||||
networks:
|
||||
- siad-stack
|
||||
networks:
|
||||
siad-stack:
|
||||
driver: bridge
|
||||
5
compose-simple-express/.dockerignore
Normal file
5
compose-simple-express/.dockerignore
Normal file
@@ -0,0 +1,5 @@
|
||||
node_modules
|
||||
npm-debug.log
|
||||
.git
|
||||
.gitignore
|
||||
.env
|
||||
6
compose-simple-express/Dockerfile
Normal file
6
compose-simple-express/Dockerfile
Normal file
@@ -0,0 +1,6 @@
|
||||
FROM node:22.11.0-alpine3.20
|
||||
WORKDIR /app
|
||||
COPY /Volumes/SSD_240/desarrollos/dev-random/simple-express /app
|
||||
RUN npm install
|
||||
EXPOSE 3000
|
||||
CMD ["npm", "start"]
|
||||
15
tesloshop-backend-main/.env.template
Normal file
15
tesloshop-backend-main/.env.template
Normal file
@@ -0,0 +1,15 @@
|
||||
APP_VERSION=0.0.1
|
||||
|
||||
|
||||
STAGE=prod
|
||||
|
||||
DB_PASSWORD=MySecr3tPassWord@as2
|
||||
DB_NAME=TesloDB
|
||||
DB_HOST=TesloDB
|
||||
DB_PORT=5432
|
||||
DB_USERNAME=postgres
|
||||
|
||||
PORT=3000
|
||||
HOST_API=http://localhost:3000/api
|
||||
|
||||
JWT_SECRET=Est3EsMISE3Dsecreto32s
|
||||
1
tesloshop-backend-main/.gitignore
vendored
Normal file
1
tesloshop-backend-main/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.env
|
||||
27
tesloshop-backend-main/README.md
Normal file
27
tesloshop-backend-main/README.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# Nest - TesloShop Backend
|
||||
|
||||
## Development
|
||||
|
||||
1. Tener corriendo el servicio de Docker (Docker Desktop o Docker Daemon)
|
||||
2. Clonar el archivo **.env.template** y renombrar la copia a **.env**
|
||||
3. Levantar los servicios con el comando
|
||||
|
||||
```
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
4. Llenar la base de datos con data temporal:
|
||||
|
||||
http://localhost:3000/api/seed
|
||||
|
||||
5. Documentación de los endpoints disponibles:
|
||||
|
||||
http://localhost:3000/api
|
||||
|
||||
# Extra
|
||||
|
||||
Si desean saber más sobre docker y cómo se construyó esta imagen, esto es parte de mi curso de Nest y Docker:
|
||||
|
||||
[Cursos sobre Docker](https://fernando-herrera.com/courses?q=docker)
|
||||
|
||||
[Imagen en DockerHub](https://hub.docker.com/repository/docker/klerith/flutter-backend-teslo-shop/general)
|
||||
39
tesloshop-backend-main/docker-compose.yml
Normal file
39
tesloshop-backend-main/docker-compose.yml
Normal file
@@ -0,0 +1,39 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
|
||||
app:
|
||||
container_name: nest-app
|
||||
restart: always
|
||||
image: klerith/flutter-backend-teslo-shop:latest
|
||||
depends_on:
|
||||
- db
|
||||
ports:
|
||||
- ${PORT}:${PORT}
|
||||
environment:
|
||||
APP_VERSION: ${APP_VERSION}
|
||||
STAGE: ${STAGE}
|
||||
DB_PASSWORD: ${DB_PASSWORD}
|
||||
DB_NAME: ${DB_NAME}
|
||||
DB_HOST: ${DB_HOST}
|
||||
DB_PORT: ${DB_PORT}
|
||||
DB_USERNAME: ${DB_USERNAME}
|
||||
PORT: ${PORT}
|
||||
HOST_API: ${HOST_API}
|
||||
JWT_SECRET: ${JWT_SECRET}
|
||||
|
||||
db:
|
||||
image: postgres:16.1
|
||||
restart: always
|
||||
ports:
|
||||
- "5432:5432"
|
||||
environment:
|
||||
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
||||
POSTGRES_DB: ${DB_NAME}
|
||||
container_name: ${DB_NAME}
|
||||
volumes:
|
||||
- /Volumes/HDD_MINI/dev_docker/docker_postgresql/tesloshop_db:/var/lib/postgresql/data
|
||||
|
||||
volumes:
|
||||
postgres-db:
|
||||
external: false
|
||||
Reference in New Issue
Block a user