GitBucket
4.23.1
Toggle navigation
Sign in
Files
Branches
1
Releases
Issues
Pull requests
Labels
Priorities
Milestones
Wiki
Forks
hincoco
/
LaravelSample
Browse code
エラー対応のため修正する
main
1 parent
ef7f2c0
commit
4f9b06a423c87ce20a3a02c1b85794128c03ac98
Shinya Tomozumi
authored
on 20 May
Patch
Showing
2 changed files
.docker/web/nginx/Dockerfile
docker-compose.yml
Ignore Space
Show notes
View
.docker/web/nginx/Dockerfile
FROM nginx:1.27.2-alpine LABEL authors="Hincoto" LABEL version="1.0" LABEL name="nginx" LABEL description="Nginx for Hincoto" ENV TZ=Asia/Tokyo WORKDIR /var/www/html # Install packages RUN set -eux \ apk update -qq && apk upgrade -qq && apk add --no-cache \ bash \ vim # ADD nginx config \ ADD ./.docker/web/nginx/nginx.conf /etc/nginx/nginx.conf ADD ./.docker/web/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf
FROM nginx:1.27.2-alpine LABEL authors="Hincoto" LABEL version="1.0" LABEL name="nginx" LABEL description="Nginx for Hincoto" ENV TZ=Asia/Tokyo WORKDIR /var/www/html # Install packages RUN set -eux \ apk update -qq && apk upgrade -qq && apk add --no-cache \ bash \ vim ## ADD nginx config \ #ADD ./.docker/web/nginx/nginx.conf /etc/nginx/nginx.conf #ADD ./.docker/web/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf
Ignore Space
Show notes
View
docker-compose.yml
services: # PHP Service web_app: container_name: web_app build: context: . dockerfile: .docker/web/php/Dockerfile depends_on: - database volumes: - ./src/:/app/ - ./.docker/logs/web/php:/var/log/php # Nginx Service web_nginx: container_name: web-nginx build: context: . dockerfile: .docker/web/nginx/Dockerfile depends_on: - database volumes: - ./src/:/app/ - ./.docker/logs/web/nginx:/var/log/nginx # Database Service database: image: postgres:17.5-alpine3.21 container_name: database ports: - "5432:5432" restart: unless-stopped environment: POSTGRES_DB: sample-db POSTGRES_USER: postgres POSTGRES_PASSWORD: testpassword volumes: - ./.docker/db_data:/var/lib/postgresql/data - ./.docker/logs/db:/var/log/postgresql healthcheck: test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"] interval: 5s timeout: 5s retries: 5 volumes: db-volumes:
services: # PHP Service web_app: container_name: web_app build: context: . dockerfile: .docker/web/php/Dockerfile depends_on: - database volumes: - ./src/:/app/ - ./.docker/logs/web/php:/var/log/php # Nginx Service web_nginx: container_name: web-nginx build: context: . dockerfile: .docker/web/nginx/Dockerfile depends_on: - database volumes: - ./src/:/app/ - ./.docker/web/nginx/conf.d:/etc/nginx/conf.d - ./.docker/web/nginx/nginx.conf:/etc/nginx/nginx.conf - ./.docker/logs/web/nginx:/var/log/nginx # Database Service database: image: postgres:17.5-alpine3.21 container_name: database ports: - "5432:5432" restart: unless-stopped environment: POSTGRES_DB: sample-db POSTGRES_USER: postgres POSTGRES_PASSWORD: testpassword volumes: - ./.docker/db_data:/var/lib/postgresql/data - ./.docker/logs/db:/var/log/postgresql healthcheck: test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"] interval: 5s timeout: 5s retries: 5 volumes: db-volumes:
Show line notes below