Skip to content

Commit

Permalink
feat: https起動を追加
Browse files Browse the repository at this point in the history
  • Loading branch information
sktaz committed Dec 23, 2023
1 parent 1f44670 commit bd8d0ee
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 5 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,7 @@ doc/
/node_modules

# Ignore precompiled assets for production environment
/public/assets
/public/assets


/https-portal-data
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list

# ライブラリをインストール
RUN apt-get update -qq && \
apt-get install -y build-essential libpq-dev nodejs postgresql-client yarn vim
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs postgresql-client yarn vim

ENV EDITOR=vim
WORKDIR /sample_api
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ rails s -b 0.0.0.0 -p 3001
docker-compose build
docker-compose up -d
docker-compose exec web bash
```

- 2.ライブラリのインストール(bashで実行)
Expand All @@ -53,7 +52,6 @@ bundle install
- 3.APIサーバーの起動(bash上で実行)
```
rails s -b 0.0.0.0 -p 3001
```


Expand Down
4 changes: 4 additions & 0 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,8 @@

# Raise error when a before_action's only/except options reference missing actions
config.action_controller.raise_on_missing_callback_actions = true


config.hosts << "sksk.example.com"
config.force_ssl = false
end
16 changes: 16 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,22 @@ services:
ports:
- "3001:3001"

https-portal:
image: steveltn/https-portal:1.23
ports:
- '80:80'
- '443:443'
restart: always
environment:
DOMAINS: 'sksk.example.com -> http://web:3001'
STAGE: 'local'
# STAGE: 'production' # Don't use production until staging works
# FORCE_RENEW: 'true'
volumes:
- ./https-portal-data:/var/lib/https-portal



volumes:
postgres:
driver: local
Expand Down

0 comments on commit bd8d0ee

Please sign in to comment.