Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Concluido Projeto #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions backend/dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM php:7.4-apache

WORKDIR /var/www/html
COPY idenx.php /var/www/html/
COPY conexao.php /var/www/html/

RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) gd \
&& docker-php-ext-install pdo_mysql \
&& docker-php-ext-install mysqli


EXPOSE 80
11 changes: 11 additions & 0 deletions database/dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM mysql:5.7

WORKDIR /var/lib/mysql/

ENV MYSQL_ROOT_PASSWORD=senha123

ENV MYSQL_DATABASE=meubanco

ADD sql.sql /docker-entrypoint-initdb.d

EXPOSE 3306
6 changes: 6 additions & 0 deletions database/sql.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
CREATE TABLE mensagens (
id int,
nome varchar(50),
email varchar(50),
comentario varchar(100)
);