-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #154 from TMHBOFH/develop
update Dockerfile, build and push Image
- Loading branch information
Showing
5 changed files
with
59 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: publish | ||
|
||
on: [push] | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
jobs: | ||
build-and-push-image: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Log in to the Container registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
FROM php:7-apache | ||
FROM php:8.1-apache | ||
|
||
RUN rm -rf /var/www/html/* | ||
WORKDIR /var/www/html/ | ||
|
||
# Install Node | ||
RUN apt-get update && apt-get -y install curl gnupg | ||
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - | ||
RUN curl -sL https://deb.nodesource.com/setup_18.x | bash - | ||
RUN apt-get update && apt-get -y install nodejs | ||
|
||
# Install PHP modules | ||
RUN docker-php-ext-install mysqli | ||
|
||
# Install Node depdencies | ||
COPY package.json . | ||
COPY package.json . | ||
COPY config.env.php config.php | ||
RUN npm install | ||
# Install PoracleWeb | ||
COPY . . | ||
COPY . . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,28 @@ | ||
version: '3.1' | ||
services: | ||
poracle-web: | ||
build: ./poracleWeb # folder or subfolder where poracle-web is located | ||
image: ghcr.io/bbdoc/poracleweb:main | ||
container_name: poracle-web | ||
restart: unless-stopped | ||
tty: true | ||
environment: | ||
PORACLE_DB_HOST: poracle-db | ||
PORACLE_DB_DATABASE: poracledb | ||
PORACLE_DB_USERNAME: poracleuser | ||
PORACLE_DB_PASSWORD: dbPassword | ||
PORACLE_DB_PORT: 3306 | ||
ADMIN_ID: 123456789123456 | ||
REDIRECT_URL: https://poracle.map.com # | ||
DISCORD_BOT_CLIENT_ID: 123456789123456789 | ||
DISCORD_BOT_CLIENT_SECRET: abcdefghijklmnopqrstuvwxyz | ||
MAP_URL: https://tiles.map.com/staticmap/poracle-web?img=https://raw.githubusercontent> | ||
MAP_PORACLE_WEB: https://tiles.map.com/staticmap/poracle-web | ||
# for the configuration you can work with environment variables or bind config.php into container | ||
# environment: | ||
# PORACLE_DB_HOST: poracle-db | ||
# PORACLE_DB_DATABASE: poracledb | ||
# PORACLE_DB_USERNAME: poracleuser | ||
# PORACLE_DB_PASSWORD: dbPassword | ||
# PORACLE_DB_PORT: 3306 | ||
# ADMIN_ID: 123456789123456 | ||
# REDIRECT_URL: https://poracle.map.com # | ||
# DISCORD_BOT_CLIENT_ID: 123456789123456789 | ||
# DISCORD_BOT_CLIENT_SECRET: abcdefghijklmnopqrstuvwxyz | ||
# MAP_URL: https://tiles.map.com/staticmap/poracle-web?img=https://raw.githubusercontent> | ||
# MAP_PORACLE_WEB: https://tiles.map.com/staticmap/poracle-web | ||
depends_on: | ||
- poracle-db | ||
- poracle | ||
volumes: | ||
- ./poracle/:/poracle/ | ||
# - ./config.php:/var/www/html/config.php | ||
- /etc/localtime:/etc/localtime:ro | ||
ports: | ||
- 127.0.0.1:9060:80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters