Skip to content

Commit

Permalink
Adicionei 2 fotos.
Browse files Browse the repository at this point in the history
  • Loading branch information
staminna committed Feb 23, 2021
1 parent 8c20017 commit 92aaca1
Show file tree
Hide file tree
Showing 10 changed files with 104 additions and 13 deletions.
32 changes: 32 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "Existing Dockerfile",

// Sets the run context to one level up instead of the .devcontainer folder.
"context": "..",

// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
"dockerFile": "../Dockerfile",

// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": null
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": []

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Uncomment the next line to run commands after the container is created - for example installing curl.
// "postCreateCommand": "apt-get update && apt-get install -y curl",

// Uncomment when using a ptrace-based debugger like C++, Go, and Rust
// "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],

// Uncomment to use the Docker CLI from inside the container. See https://aka.ms/vscode-remote/samples/docker-from-docker.
// "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ],

// Uncomment to connect as a non-root user if you've added one. See https://aka.ms/vscode-remote/containers/non-root.
// "remoteUser": "vscode"
}
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,8 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*

Dockerfile
Docker-compose.prod.yml
docker-compose.compose.yml
dockerignore
11 changes: 11 additions & 0 deletions Docker-compose.prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: '3.7'

services:

modos-prod:
container_name: modos-prod
build:
context: .
dockerfile: Dockerfile.prod
ports:
- '1337:80'
26 changes: 13 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# base image
FROM node:8.4
# pull official base image
FROM node:13.12.0-alpine

# set working directory
WORKDIR /Users/jorgenunes/webdev/modos
WORKDIR /app

# install and cache app dependencies
COPY package*.json ./
ADD package.json /usr/src/app/package.json
RUN npm install
RUN npm install [email protected] -g
# add `/app/node_modules/.bin` to $PATH
ENV PATH /app/node_modules/.bin:$PATH

# bundle app source
COPY . .
# install app dependencies
COPY package.json ./
COPY package-lock.json ./
RUN npm install --silent
RUN npm install [email protected] -g --silent

EXPOSE 3000
# add app
COPY . ./

# start app
CMD ["npm", "start"]

CMD ["npm", "start"]
16 changes: 16 additions & 0 deletions Dockerfile.prod
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# build environment
FROM node:13.12.0-alpine as build
WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH
COPY package.json ./
COPY package-lock.json ./
RUN npm ci --silent
RUN npm install [email protected] -g --silent
COPY . ./
RUN npm run build

# production environment
FROM nginx:stable-alpine
COPY --from=build /app/build /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
16 changes: 16 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: '3.7'

services:

modos:
container_name: modos
build:
context: .
dockerfile: Dockerfile
volumes:
- '.:/app'
- '/app/node_modules'
ports:
- 3001:3000
environment:
- CHOKIDAR_USEPOLLING=true
5 changes: 5 additions & 0 deletions dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
build
.dockerignore
Dockerfile
Dockerfile.prod
Binary file added public/fotos/a1_obra.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/fotos/a2_fundacoes.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ class App extends Component {
<div className="group">
<div className="left">
<Slider {...settings}>
<div>
<img alt="inicio obra arquitetura" className="fotos" src="fotos/a1_obra.jpg"/>
</div>
<div>
<img alt="inicio obra fundações" className="fotos" src="fotos/a2_fundacoes.jpg"/>
</div>
<div>
<img alt="detalhe loja" className="fotos" src="fotos/1_detalhe_loja.jpg"/>
</div>
Expand Down

0 comments on commit 92aaca1

Please sign in to comment.