Skip to content

Commit

Permalink
chore: adiciona network, ports e depends ao docker-compose; remover d…
Browse files Browse the repository at this point in the history
…ocker file desnecessaria
  • Loading branch information
pedrovsbenevides committed May 29, 2024
1 parent 17fa3db commit 8c7b41b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
2 changes: 0 additions & 2 deletions Dockerfile

This file was deleted.

27 changes: 19 additions & 8 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,23 @@ version: '3.1'

services:

wordpress:
build:
context: .
dockerfile: Dockerfile
app:
image: wordpress:latest
container_name: g2bc
restart: always
ports:
- 8080:80
environment:
WORDPRESS_DB_HOST: '${WORDPRESS_DB_HOST}'
WORDPRESS_DB_USER: '${WORDPRESS_DB_USER}'
WORDPRESS_DB_PASSWORD: '${WORDPRESS_DB_PASSWORD}'
WORDPRESS_DB_NAME: '${WORDPRESS_DB_NAME}'
ports:
- 8001:80
volumes:
- ./public_html:/var/www/html
depends_on:
- db
networks:
- internal

db:
container_name: '${WORDPRESS_DB_HOST}'
Expand All @@ -30,7 +33,15 @@ services:
volumes:
- ./db:/var/lib/mysql
- ./g2bcun_geral:/docker-entrypoint-initdb.d
ports:
- 3306:3306
networks:
- internal

networks:
internal:
external: true

volumes:
wordpress:
db:
public_html:
db:

0 comments on commit 8c7b41b

Please sign in to comment.