Dockerfile 및 compose 작성
This commit is contained in:
parent
a636702eb2
commit
4228f4e93b
4 changed files with 46 additions and 0 deletions
10
.docker/Dockerfile
Normal file
10
.docker/Dockerfile
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
FROM php:7.4-apache
|
||||
|
||||
# install mysqli and gd
|
||||
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
|
||||
RUN chmod +x /usr/local/bin/install-php-extensions && \
|
||||
install-php-extensions gd mysqli
|
||||
|
||||
# install app
|
||||
COPY ./AvocadoEdition /var/www/html/
|
||||
RUN chmod -R 707 /var/www/html/data
|
||||
6
.env.example
Normal file
6
.env.example
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
APP_PORT=80
|
||||
|
||||
MYSQL_ROOT_PASSWORD=avocadoedition
|
||||
MYSQL_DATABASE=avocadoedition
|
||||
MYSQL_USER=avocadoedition
|
||||
MYSQL_PASSWORD=avocadoedition
|
||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
.env
|
||||
29
docker-compose.yaml
Normal file
29
docker-compose.yaml
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
services:
|
||||
app:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./.docker/Dockerfile
|
||||
container_name: avocado-edition-app
|
||||
volumes:
|
||||
- ./AvocadoEdition:/var/www/html
|
||||
ports:
|
||||
- ${APP_PORT:-80}:80
|
||||
depends_on:
|
||||
- db
|
||||
restart: unless-stopped
|
||||
db:
|
||||
image: lscr.io/linuxserver/mariadb:latest
|
||||
container_name: avocado-edition-db
|
||||
volumes:
|
||||
- mariadb:/config
|
||||
environment:
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
- TZ=Asia/Seoul
|
||||
- MYSQL_ROOT_PASSWORD=${ROOT_ACCESS_PASSWORD:-avocadoedition}
|
||||
- MYSQL_DATABASE=${MYSQL_DATABASE:-avocadoedition}
|
||||
- MYSQL_USER=${MYSQL_USER:-avocadoedition}
|
||||
- MYSQL_PASSWORD=${DATABASE_PASSWORD:-avocadoedition}
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
mariadb:
|
||||
Loading…
Reference in a new issue