mirror of
https://github.com/bitinflow/expose.git
synced 2026-03-13 13:35:54 +00:00
adding a docker-compose file for starting a server
This commit is contained in:
4
.env-example
Normal file
4
.env-example
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
PORT=8080
|
||||||
|
DOMAIN=example.com
|
||||||
|
ADMIN_USERNAME=username
|
||||||
|
ADMIN_PASSWORD=password
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -7,3 +7,4 @@
|
|||||||
expose.php
|
expose.php
|
||||||
database/expose.db
|
database/expose.db
|
||||||
.expose.php
|
.expose.php
|
||||||
|
.env
|
||||||
|
|||||||
23
Dockerfile
Normal file
23
Dockerfile
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
FROM php:7.4-cli
|
||||||
|
|
||||||
|
RUN apt-get update
|
||||||
|
RUN apt-get install -y git libzip-dev zip
|
||||||
|
|
||||||
|
RUN docker-php-ext-install zip
|
||||||
|
|
||||||
|
# Get latest Composer
|
||||||
|
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
||||||
|
|
||||||
|
COPY . /src
|
||||||
|
WORKDIR /src
|
||||||
|
|
||||||
|
# install the dependencies
|
||||||
|
RUN composer install -o --prefer-dist && chmod a+x expose
|
||||||
|
|
||||||
|
ENV port=8080
|
||||||
|
ENV domain=localhost
|
||||||
|
ENV username=username
|
||||||
|
ENV password=password
|
||||||
|
ENV exposeConfigPath=/src/config/expose.php
|
||||||
|
|
||||||
|
CMD sed -i "s|username|${username}|g" ${exposeConfigPath} && sed -i "s|password|${password}|g" ${exposeConfigPath} && php expose serve ${domain} --port ${port} --validateAuthTokens
|
||||||
14
docker-compose.yml
Normal file
14
docker-compose.yml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
version: "3.7"
|
||||||
|
services:
|
||||||
|
expose:
|
||||||
|
image: lukepolo/expose-server:latest
|
||||||
|
ports:
|
||||||
|
- 127.0.0.1:8080:${PORT}
|
||||||
|
environment:
|
||||||
|
port: ${PORT}
|
||||||
|
domain: ${DOMAIN}
|
||||||
|
username: ${ADMIN_USERNAME}
|
||||||
|
password: ${ADMIN_PASSWORD}
|
||||||
|
restart: always
|
||||||
|
volumes:
|
||||||
|
- ./database/expose.db:/root/.expose
|
||||||
Reference in New Issue
Block a user