Commit c61cccc5 authored by David's avatar David

Argh

parent 55754f32
Pipeline #36 failed
db_password.txt
db_root_password.txt
\ No newline at end of file
db_root_password.txt
db_data/
wp_themes/
wp_plugins/
build:
image: docker:stable
services:
- docker:dind
variables:
DOCKER_HOST: tcp://docker:2375
DOCKER_DRIVER: overlay2
stage: build
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- cd wordpress
- docker build -t $CI_REGISTRY:latest .
- docker push $CI_REGISTRY:latest
# build-snuffleupagus:
# image: alpine:3.10
# services:
# - docker:dind
# variables:
# DOCKER_HOST: tcp://docker:2375
# DOCKER_DRIVER: overlay2
# stage: package
# script:
# - apk --no-cache add alpine-sdk coreutils cmake
# - adduser -G abuild -g "Alpine Package Builder" -s /bin/ash -D builder
# - echo "builder ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
# - mkdir /packages
# - chown builder:abuild /packages
# - su - builder
# - cd /packages
# - git clone https://github.com/nbs-system/snuffleupagus
# - cd snuffleupagus
# - git checkout v0.5.0
# - abuild-keygen -a
# - abuild -r
# artifacts:
# paths:
# -
# build:
# image: docker:stable
# services:
# - docker:dind
# variables:
# DOCKER_HOST: tcp://docker:2375
# DOCKER_DRIVER: overlay2
# stage: build
# script:
# - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
# - cd wordpress
# - docker build -t $CI_REGISTRY:latest .
# - docker push $CI_REGISTRY:latest
......@@ -2,15 +2,17 @@ version: '3.1'
services:
wordpress:
image: gitlab-registry.light.kow.is/kowis-projects/wordpress-container
# Not using my custom image, because building snuffleupagus is proving to be more irritating than it's worth
#image: gitlab-registry.light.kow.is/kowis-projects/wordpress-container
image: wordpress:php7.3
restart: always
volumes:
- wp_themes:/var/www/html/wp-content/themes/
- wp_plugins:/var/www/html/wp-content/plugins/
- ./wp_themes:/var/www/html/wp-content/themes/
- ./wp_plugins:/var/www/html/wp-content/plugins/
ports:
- 8080:80
environment:
WORDPRESS_DB_HOST: db
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD_FILE: /run/secrets/db_password
WORDPRESS_DB_NAME: wordpress
......@@ -21,12 +23,12 @@ services:
image: mariadb:10
restart: always
volumes:
- db_data:/var/lib/mysql
- ./db_data:/var/lib/mysql
environment:
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD_FILE: /run/secrets/db_password
MYSQL_RANDOM_ROOT_PASSWORD_FILE: /run/secrets/db_root_password
MYSQL_ROOT_PASSWORD_FILE: /run/secrets/db_root_password
secrets:
- db_root_password
- db_password
......@@ -36,9 +38,3 @@ secrets:
file: db_password.txt
db_root_password:
file: db_root_password.txt
volumes:
db_data:
wp_themes:
wp_plugins:
\ No newline at end of file
FROM wordpress:php7.3
FROM wordpress:php7.3-fpm-alpine
# going to add the snuffleupagus security php module
RUN curl https://github.com/nbs-system/snuffleupagus/releases/download/v0.5.0/snuffleupagus_0.5.0_amd64.deb -o snuffleupagus_0.5.0_amd64.deb \
&& apt -y update \
&& apt -y install ./snuffleupagus_0.5.0_amd64.deb \
&& apt -y clean
# RUN curl https://github.com/nbs-system/snuffleupagus/releases/download/v0.5.0/snuffleupagus_0.5.0_amd64.deb -o snuffleupagus_0.5.0_amd64.deb \
# && apt -y update \
# && apt-get -y install ./snuffleupagus_0.5.0_amd64.deb \
# && apt -y clean
RUN cd /tmp \
&& apk update \
&& apk add git \
&& git clone https://github.com/nbs-system/snuffleupagus \
&& cd snuffleupagus \
&& git checkout v0.5.0 \
&& apk add alpine-sdk \
&& abuild -r
\ 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