Skip to content

Commit a6f5d24

Browse files
mufti1giosakti
authored andcommitted
Docker compose for easy development (gate-sso#158)
* add docker compose script * put instruction how to run with docker-compose in readme files
1 parent 8fb24e7 commit a6f5d24

File tree

4 files changed

+21
-0
lines changed

4 files changed

+21
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ config/application.yml
2525
public/assets/*
2626
dump.rdb
2727
coverage
28+
data/

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ If you want Gate to setup VPN for you then just install OpenVPN with easy rsa. G
6868
* Build docker image using `docker build -t gate .`
6969
* Create and update `.env` file according to `.env.example` with appropriate values
7070
* Run the image using `docker run -p 3000:3000 --env-file=.env -it gate`
71+
* If you want use docker-compose run using `docker-compose up`
7172

7273
## Additional Topics
7374

docker-compose.yaml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
version: "2"
2+
services:
3+
gate-sql:
4+
image: mysql:5.7
5+
volumes:
6+
- ${PWD}/data:/var/lib/mysql
7+
environment:
8+
- MYSQL_ALLOW_EMPTY_PASSWORD=true
9+
10+
gate:
11+
image: gate
12+
ports:
13+
- "3000:3000"
14+
depends_on:
15+
- gate-sql
16+
env_file:
17+
- .env
18+
command: sh ./setup.sh

setup.sh

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rake db:setup && rails s

0 commit comments

Comments
 (0)