Skip to content

Commit 9a744ad

Browse files
committed
🚧 Devcontainerの整備
1 parent d52861e commit 9a744ad

2 files changed

Lines changed: 15 additions & 3 deletions

File tree

.devcontainer/000-default.conf

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<VirtualHost *:80>
2+
ServerAdmin webmaster@localhost
3+
DocumentRoot /app/public_html
4+
5+
<Directory "/app/public_html">
6+
Options Indexes FollowSymLinks
7+
AllowOverride All
8+
Require all granted
9+
</Directory>
10+
11+
ErrorLog ${APACHE_LOG_DIR}/error.log
12+
CustomLog ${APACHE_LOG_DIR}/access.log combined
13+
</VirtualHost>

.devcontainer/Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ FROM php:8.2-apache
44
# OSのパッケージリストを更新
55
RUN apt-get update
66

7-
# Apache の設定を調整
8-
RUN a2enmod rewrite && \
9-
sed -i 's!/var/www/html!/app/public_html!g' /etc/apache2/sites-available/000-default.conf
7+
# ローカルから Apache の設定ファイルをコピー
8+
COPY .devcontainer/000-default.conf /etc/apache2/sites-available/000-default.conf
109

1110
# ロケールの設定 (ja_JP.UTF-8)
1211
RUN apt-get update && apt-get -y install locales && \

0 commit comments

Comments
 (0)