Skip to content

Commit 2a937a0

Browse files
committed
chore: archivos iniciales
0 parents  commit 2a937a0

File tree

13 files changed

+212
-0
lines changed

13 files changed

+212
-0
lines changed

.editorconfig

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
root = true
2+
3+
[*]
4+
indent_style = tab
5+
end_of_line = lf
6+
charset = utf-8
7+
trim_trailing_whitespace = true
8+
insert_final_newline = true
9+
10+
[{package.json,*.yml}]
11+
indent_style = space
12+
indent_size = 2
13+
14+
[*.md]
15+
trim_trailing_whitespace = false
16+
17+
[*.js]
18+
trim_trailing_whitespace = false
19+
indent_size = 4

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.volumes/
2+
.DS_Store
3+
node_modules/
4+
npm-debug.log
5+
*-error.log
6+
yarn.lock
7+
*.sql
8+
*.zip
9+
source/blog-frontend/*
10+
wp-env.php

Makefile

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
.DEFAULT_GOAL := help
2+
3+
setup: ## Build and Install
4+
sh ./docker/scripts/setup.sh
5+
6+
build: ## Build images
7+
sh ./docker/scripts/build.sh
8+
9+
install: ## Install dependencies
10+
sh ./docker/scripts/supply.sh
11+
12+
up: ## Up services
13+
docker-compose up -d
14+
15+
uplog: ## Up services with logs
16+
docker-compose up
17+
18+
down: ## Stop and remove services
19+
docker-compose down
20+
21+
reload: ## Reload services
22+
docker-compose restart
23+
24+
list: ## List of current active services
25+
docker-compose ps
26+
27+
ssh: ## Connect to container
28+
docker-compose exec -it $(CONTAINER) sh
29+
30+
help:
31+
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-16s\033[0m %s\n", $$1, $$2}'

docker-compose.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
version: '2'
2+
3+
services:
4+
mysql:
5+
image: lucydb
6+
environment:
7+
MYSQL_ROOT_PASSWORD: 123456
8+
MYSQL_USER: root
9+
MYSQL_DATABASE: frontend_wp
10+
ports:
11+
- 3320:3306
12+
volumes:
13+
- .volumes/mysql/:/var/lib/mysql/
14+
# wpfrontend:
15+
# image: wp
16+
# volumes:
17+
# - ./source/blog-frontend/:/var/www/html/
18+
# ports:
19+
# - 81:80
20+
# depends_on:
21+
# - mysql
22+
# phpmyadmin:
23+
# image: phpmyadmin/phpmyadmin
24+
# environment:
25+
# PMA_HOST: apiwithloopback_mysql_1 # db host
26+
# PMA_USER: root
27+
# PMA_PASSWORD: 123456
28+
# ports:
29+
# - 85:80
30+
# depends_on:
31+
# - mysql
32+
# api:
33+
# extends:
34+
# file: ./docker/compose/supply-api.yml
35+
# service: deps
36+
# environment:
37+
# NODE_ENV: development
38+
# DEBUG: node
39+
# ports:
40+
# - 3000:2999
41+
# command: yarn run start
42+
# depends_on:
43+
# - mysql
44+
# - phpmyadmin

docker/compose/build.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: '2'
2+
3+
services:
4+
mysql:
5+
image: lucydb
6+
build:
7+
context: ../lucydb/
8+
# wpfrontend:
9+
# image: wp
10+
# build:
11+
# context: ../wp/

docker/compose/supply-blog.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
version: '2'
2+
3+
services:
4+
import:
5+
image: lucydb
6+
environment:
7+
MYSQL_ROOT_PASSWORD: 123456
8+
MYSQL_USER: root
9+
MYSQL_DATABASE: frontend_wp
10+
ports:
11+
- 3320:3306
12+
volumes:
13+
- .volumes/mysql/:/var/lib/mysql/
14+
- ../../db/:/tmp/mysql/

docker/lucydb/Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM mysql:5.7
2+
MAINTAINER Jan Sanchez <[email protected]>
3+
4+
# Udpating and Installing dependencies
5+
RUN apt-get update && apt-get install -y --no-install-recommends \
6+
ca-certificates \
7+
curl \
8+
xz-utils \
9+
openssl \
10+
&& rm -rf /var/lib/apt/lists/*
11+
12+
RUN mkdir -p /tmp/mysql/
13+
14+
#ADD init_db.sh /tmp/init_db.sh
15+
#RUN /tmp/init_db.sh

docker/lucydb/init_db.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
/usr/bin/mysqld_safe &
3+
sleep 5
4+
mysql -u root -p 123456 -e "CREATE DATABASE frontend_wp"
5+
mysql -u root -p 123456 frontend_wp < /tmp/frontend_wp.sql

docker/scripts/build.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#! /bin/bash
2+
unset ENV_USER
3+
unset ENV_GID
4+
unset ENV_UID
5+
6+
export ENV_USER=$(whoami)
7+
export ENV_GID=$(id -g)
8+
export ENV_UID=$(id -u)
9+
10+
docker-compose -f ./docker/compose/build.yml build $1

docker/scripts/setup.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#! /bin/bash
2+
3+
# build
4+
./docker/scripts/build.sh
5+
6+
# supply
7+
./docker/scripts/supply.sh

0 commit comments

Comments
 (0)