Fakultas Ilmu Komputer UI

Commit 714f04a5 authored by Muhammad Indra Ramadhan's avatar Muhammad Indra Ramadhan
Browse files

Unuse docker

parent 1998f833
FROM php:7.1.5-apache
RUN apt-get update && apt-get install -y libpq-dev && docker-php-ext-install pdo pdo_pgsql
#set our application folder as an environment variable
ENV APP_HOME /var/www/html
#change uid and gid of apache to docker user uid/gid
RUN usermod -u 1000 www-data && groupmod -g 1000 www-data
# enable apache module rewrite
RUN a2enmod rewrite
#copy source files and run composer
COPY . $APP_HOME
#change ownership of our applications
RUN chown -R www-data:www-data $APP_HOME
\ No newline at end of file
/node_modules
/public/hot
/public/storage
/storage/*.key
/vendor
.env
.env.backup
.phpunit.result.cache
Homestead.json
Homestead.yaml
npm-debug.log
yarn-error.log
Dockerfile
docker-compose.yml
\ No newline at end of file
FROM php:7.3
WORKDIR /app
RUN apt-get update -y && apt-get install -y libpq-dev openssl zip unzip git nodejs npm
RUN docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql
RUN docker-php-ext-install pdo pdo_pgsql pgsql
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
COPY . /app
RUN composer install
RUN npm install
RUN npm run dev
COPY ./.env.prod.example /app/.env
CMD php artisan key:generate && php artisan migrate && php artisan serve --host=0.0.0.0
EXPOSE 8000
\ No newline at end of file
version: '2'
services:
adminer:
container_name: admin
image: akunuseless/adminer-sso
ports:
- "3000:80"
depends_on:
- postgres
environment:
- PRODUCTION=1
- VENDOR=pgsql
- SERVER=postgres
- USERNAME=adminer
- PASSWORD=p4ssw0rd
- BASE_URL=https://opensauce.cs.ui.ac.id/adminer
admin:
container_name: adminer-admin
restart: always
image: akunuseless/adminer-admin
depends_on:
- postgres
ports:
- "8000:8000"
volumes:
- ./.volume.env:/app/.env
postgres:
image: postgres
restart: always
environment:
- POSTGRES_USER=adminer
- POSTGRES_PASSWORD=p4ssw0rd
- POSTGRES_DB=dummy
volumes:
- ./.volume_db:/var/lib/postgresql/data
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment