Skip to content

Commit f60dcce

Browse files
committed
Update dev-docker setup
1 parent 25c7233 commit f60dcce

File tree

6 files changed

+72
-151
lines changed

6 files changed

+72
-151
lines changed

.docker/nginx/app.laravel-ban.80.conf

Lines changed: 0 additions & 40 deletions
This file was deleted.

.docker/php/Dockerfile renamed to .docker/php/php81/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# ----------------------
22
# The FPM base container
33
# ----------------------
4-
FROM php:8.1-fpm-alpine AS dev
4+
FROM php:8.1-cli-alpine AS dev
5+
6+
RUN apk add --no-cache --virtual .build-deps \
7+
$PHPIZE_DEPS
58

69
# Cleanup apk cache and temp files
710
RUN rm -rf /var/cache/apk/* /tmp/*

.docker/php/php82/Dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# ----------------------
2+
# The FPM base container
3+
# ----------------------
4+
FROM php:8.2-cli-alpine AS dev
5+
6+
RUN apk add --no-cache --virtual .build-deps \
7+
$PHPIZE_DEPS
8+
9+
# Cleanup apk cache and temp files
10+
RUN rm -rf /var/cache/apk/* /tmp/*
11+
12+
# ----------------------
13+
# Composer install step
14+
# ----------------------
15+
16+
# Get latest Composer
17+
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
18+
19+
# ----------------------
20+
# The FPM production container
21+
# ----------------------
22+
FROM dev

.docker/php/php83/Dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# ----------------------
2+
# The FPM base container
3+
# ----------------------
4+
FROM php:8.3-cli-alpine AS dev
5+
6+
RUN apk add --no-cache --virtual .build-deps \
7+
$PHPIZE_DEPS
8+
9+
# Cleanup apk cache and temp files
10+
RUN rm -rf /var/cache/apk/* /tmp/*
11+
12+
# ----------------------
13+
# Composer install step
14+
# ----------------------
15+
16+
# Get latest Composer
17+
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
18+
19+
# ----------------------
20+
# The FPM production container
21+
# ----------------------
22+
FROM dev

.docker/php/www.conf

Lines changed: 0 additions & 85 deletions
This file was deleted.

docker-compose.yaml

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,34 @@
11
version: "3.9"
22
services:
3-
app:
4-
container_name: laravel-ban-app
5-
image: laravel-ban-app
3+
php81:
4+
container_name: laravel-ban-lib-81
5+
image: laravel-ban-lib-81
66
build:
77
context: ./
8-
dockerfile: ./.docker/php/Dockerfile
9-
restart: unless-stopped
8+
dockerfile: ./.docker/php/php81/Dockerfile
9+
tty: true
1010
working_dir: /app
1111
volumes:
1212
- ./:/app
13-
- ./.docker/php/www.conf:/usr/local/etc/php-fpm.d/www.conf:ro
14-
networks:
15-
- laravel-ban
1613

17-
nginx:
18-
container_name: laravel-ban-nginx
19-
image: nginx:1.21-alpine
20-
restart: unless-stopped
21-
depends_on:
22-
- app
23-
ports:
24-
- "80:80"
25-
environment:
26-
VIRTUAL_HOST: app.laravel-ban.localhost
14+
php82:
15+
container_name: laravel-ban-lib-82
16+
image: laravel-ban-lib-82
17+
build:
18+
context: ./
19+
dockerfile: ./.docker/php/php82/Dockerfile
20+
tty: true
21+
working_dir: /app
2722
volumes:
28-
- ./.docker/nginx/app.laravel-ban.80.conf:/etc/nginx/conf.d/app.laravel-ban.80.conf:ro
29-
- ./public:/app/public:ro
30-
networks:
31-
- laravel-ban
23+
- ./:/app
3224

33-
networks:
34-
laravel-ban:
35-
driver: bridge
25+
php83:
26+
container_name: laravel-ban-lib-83
27+
image: laravel-ban-lib-83
28+
build:
29+
context: ./
30+
dockerfile: ./.docker/php/php83/Dockerfile
31+
tty: true
32+
working_dir: /app
33+
volumes:
34+
- ./:/app

0 commit comments

Comments
 (0)