Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e7d26d1

Browse files
committed
feat: add dockerfile and docker-compose
1 parent f581724 commit e7d26d1

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

Dockerfile

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM alpine
2+
3+
ADD ./dist/coder-linux_linux_amd64_v1/coder /opt/coder
4+
5+
ENTRYPOINT [ "/opt/coder", "server" ]

docker-compose.yaml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
version: "3.9"
2+
services:
3+
coder:
4+
build: .
5+
ports:
6+
- "7080:3000"
7+
environment:
8+
CODER_PG_CONNECTION_URL: "postgresql://username:password@database/coder?sslmode=disable"
9+
CODER_ACCESS_URL: "http://localhost:7080"
10+
depends_on:
11+
- database
12+
database:
13+
image: "postgres:latest"
14+
environment:
15+
POSTGRES_USER: username # The PostgreSQL user (useful to connect to the database)
16+
POSTGRES_PASSWORD: password # The PostgreSQL password (useful to connect to the database)
17+
POSTGRES_DB: coder # The PostgreSQL default database (automatically created at first launch)
18+
volumes:
19+
- pgdata:/var/lib/postgresql/data
20+
volumes:
21+
pgdata:

0 commit comments

Comments
 (0)