Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New dockerfile and docker-compose files #1540

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Use an official Ruby runtime as a parent image
FROM ruby:2.6.4

# Set the working directory in the container
WORKDIR /usr/src/app

# Clone the bitcoinops.github.io repository
RUN git clone https://github.com/bitcoinops/bitcoinops.github.io.git

# Change to the repository directory
WORKDIR /usr/src/app/bitcoinops.github.io

# Install program to configure locales
RUN apt-get update
RUN apt-get install -y locales
RUN dpkg-reconfigure locales && \
locale-gen C.UTF-8 && \
/usr/sbin/update-locale LANG=C.UTF-8

# Install needed default locale for Makefly
RUN echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen && \
locale-gen

# Set default locale for the environment
ENV LC_ALL C.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8

# Install any needed gems specified in Gemfile
RUN bundle install

# Make port 4000 available to the world outside this container
EXPOSE 4000
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,20 @@ contact us at [[email protected]](mailto:[email protected]).

## Building The Site Locally

To build the site, you need to go through a one-time installation
To build the site without docker, you need to go through a one-time installation
procedure that takes 15 to 30 minutes. After that you can build the
site an unlimited number of times with no extra work.

**[You also can choose to build the site locally by docker, click here to get a guide.](./docker.md)**
**Docker**

Ensure docker and docker-compose are installed. Run the command in the project
directory.

docker-compose up --build

To restart (in the event of code change).

docker-compose down -v && docker-compose up --build

##### Install The Dependencies

Expand Down
11 changes: 11 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: '3'

services:
bitcoinops:
build: .
ports:
- "4000:4000"
volumes:
- .:/usr/src/app
working_dir: /usr/src/app
command: make preview
63 changes: 0 additions & 63 deletions docker.md

This file was deleted.