Skip to content

Commit

Permalink
[PLA-2069] Upgrade platform docker to v2.0.0 (#53)
Browse files Browse the repository at this point in the history
Signed-off-by: Leonardo Custodio <leonardo@enjin.io>
  • Loading branch information
leonardocustodio authored Nov 8, 2024
1 parent 1dd7ddb commit 6a73c63
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 20 deletions.
14 changes: 9 additions & 5 deletions configs/core/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,31 +1,35 @@
# Stage: setup-web-server
FROM php:apache-buster AS setup-web-server
FROM php:8.3-apache AS setup-web-server

# Install dependencies
RUN apt-get update -y && \
apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python2 && \
apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python3 && \
apt-get install -y libpq-dev libgmp-dev libsodium-dev libmemcached-dev zlib1g-dev wait-for-it libffi-dev golang-go && \
apt-get install -y inotify-tools libcurl4-openssl-dev libpq-dev libssl-dev supervisor dos2unix

# Install imagick and redis
RUN apt-get install -y libmagickwand-dev --no-install-recommends && \
pecl install imagick redis uv
pecl install redis uv

# This is required on PHP 8.3 (check following issue: https://github.com/Imagick/imagick/issues/640)
ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
RUN install-php-extensions imagick/imagick@master

# Install node and npm
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - &&\
apt-get install -y nodejs

# Install and enable additional php modules
RUN docker-php-ext-install ffi pdo pdo_mysql gmp bcmath sodium mysqli sockets pcntl gd
RUN docker-php-ext-enable redis imagick
RUN docker-php-ext-enable redis

# Stage: create-application
FROM setup-web-server AS create-application

WORKDIR /app/
COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer

RUN composer create-project laravel/laravel:^10.0 laravel-application
RUN composer create-project laravel/laravel:^11.0 laravel-application

COPY configs/core/composer.json /app/laravel-application
COPY configs/core/config/ /app/laravel-application/config/
Expand Down
12 changes: 6 additions & 6 deletions configs/core/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
}
],
"require": {
"php": "^8.2|^8.3",
"enjin/platform-core": "^1.0",
"enjin/platform-beam": "^1.0",
"enjin/platform-fuel-tanks": "^1.0",
"enjin/platform-marketplace": "^1.0",
"enjin/platform-ui": "^1.0",
"php": "^8.3",
"enjin/platform-core": "^2.0",
"enjin/platform-beam": "^2.0",
"enjin/platform-fuel-tanks": "^2.0",
"enjin/platform-marketplace": "^2.0",
"enjin/platform-ui": "^2.0",
"guzzlehttp/guzzle": "^7.0",
"laravel/framework": "^11.0",
"laravel/horizon": "^5.0",
Expand Down
16 changes: 7 additions & 9 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3.9"

services:
database:
image: mysql:8
Expand Down Expand Up @@ -28,13 +26,13 @@ services:

decoder:
platform: linux/amd64
image: enjin/platform-decoder:v2.0.1
image: enjin/platform-decoder:v2.1.2
restart: unless-stopped
ports:
- "${DECODER_EXTERNAL_PORT}:8090"

app:
image: enjin/platform:v1.11.0
image: enjin/platform:v2.0.0
build:
context: .
dockerfile: configs/core/Dockerfile
Expand All @@ -50,7 +48,7 @@ services:
- "host.docker.internal:host-gateway"

websocket:
image: enjin/platform:v1.11.0
image: enjin/platform:v2.0.0
build:
context: .
dockerfile: configs/core/Dockerfile
Expand All @@ -66,7 +64,7 @@ services:
- "host.docker.internal:host-gateway"

ingest:
image: enjin/platform:v1.11.0
image: enjin/platform:v2.0.0
build:
context: .
dockerfile: configs/core/Dockerfile
Expand All @@ -80,7 +78,7 @@ services:
- "host.docker.internal:host-gateway"

relay:
image: enjin/platform:v1.11.0
image: enjin/platform:v2.0.0
build:
context: .
dockerfile: configs/core/Dockerfile
Expand All @@ -93,7 +91,7 @@ services:
- "host.docker.internal:host-gateway"

beam:
image: enjin/platform:v1.11.0
image: enjin/platform:v2.0.0
build:
context: .
dockerfile: configs/core/Dockerfile
Expand All @@ -107,7 +105,7 @@ services:

daemon:
platform: linux/amd64
image: enjin/wallet-daemon:v1.9.0
image: enjin/wallet-daemon:v2.0.1
restart: unless-stopped
env_file:
- ./configs/daemon/.env
Expand Down

0 comments on commit 6a73c63

Please sign in to comment.