Add database setup commands
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
-- Write your migrate up statements here
|
||||
|
||||
CREATE DATABASE {{ .app_name_slug }}_database
|
||||
CREATE DATABASE {{ .app_name_slug }}_{{ .env }}
|
||||
|
||||
-- CREATE TABLE public.users (
|
||||
-- id bigint GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
|
||||
@ -18,4 +18,4 @@ CREATE DATABASE {{ .app_name_slug }}_database
|
||||
|
||||
-- DROP TABLE public.users
|
||||
|
||||
DROP DATABASE IF EXISTS {{ .app_name_slug }}_database
|
||||
DROP DATABASE IF EXISTS {{ .app_name_slug }}_{{ .env }}
|
||||
|
4
tmpl/Dockerfile
Normal file
4
tmpl/Dockerfile
Normal file
@ -0,0 +1,4 @@
|
||||
FROM dosco/super-graph:latest
|
||||
WORKDIR /
|
||||
|
||||
COPY config/* /config/
|
@ -1,4 +1,4 @@
|
||||
app_name: "{{ .app_name }} Development"
|
||||
app_name: "{% app_name %} Development"
|
||||
host_port: 0.0.0.0:8080
|
||||
web_ui: true
|
||||
|
||||
@ -84,7 +84,7 @@ database:
|
||||
type: postgres
|
||||
host: db
|
||||
port: 5432
|
||||
dbname: {{ .app_name_slug }}_database
|
||||
dbname: {% app_name_slug %}_development
|
||||
user: postgres
|
||||
password: ''
|
||||
|
||||
|
@ -5,7 +5,7 @@ services:
|
||||
ports:
|
||||
- "5432:5432"
|
||||
|
||||
{{ .app_name_slug }}_api:
|
||||
{% app_name_slug %}_api:
|
||||
image: dosco/super-graph:latest
|
||||
environment:
|
||||
GO_ENV: "development"
|
||||
|
@ -1,4 +1,4 @@
|
||||
app_name: "{{ .app_name }} Production"
|
||||
app_name: "{% app_name %} Production"
|
||||
host_port: 0.0.0.0:8080
|
||||
web_ui: false
|
||||
|
||||
@ -80,7 +80,7 @@ database:
|
||||
type: postgres
|
||||
host: db
|
||||
port: 5432
|
||||
dbname: {{ .app_name_slug }}_database
|
||||
dbname: {% app_name_slug %}_production
|
||||
user: postgres
|
||||
password: ''
|
||||
#pool_size: 10
|
||||
|
Reference in New Issue
Block a user